Skip to content

Instantly share code, notes, and snippets.

@maximilianschmitt
maximilianschmitt / readme.md
Last active August 29, 2015 14:19
Compiling your ES6 command line apps to work with node.js
@yang-wei
yang-wei / index.js
Created August 14, 2016 07:38
Gisty is coming
Gisty testing
@katzchang
katzchang / rule.md
Last active September 15, 2016 07:36
新社会人が守るべきだがほとんど誰も教えてくれない社会のルール

新社会人が守るべきだがほとんど誰も教えてくれない社会のルール

  • トイレットペーパーホルダーが二つあるトイレでは、紙が少ないほうを先に使いましょう
@puredanger
puredanger / rps.clj
Created July 10, 2013 12:29
Rock Paper Scissors with core.async
(require 'clojure.core.async :refer :all)
(def MOVES [:rock :paper :scissors])
(def BEATS {:rock :scissors, :paper :rock, :scissors :paper})
(defn rand-player
"Create a named player and return a channel to report moves."
[name]
(let [out (chan)]
(go (while true (>! out [name (rand-nth MOVES)])))
@TheSeamau5
TheSeamau5 / HackerNewsExample.elm
Last active September 23, 2018 00:24
Hacker news requests example
--------------------------
-- CORE LIBRARY IMPORTS --
--------------------------
import Task exposing (Task, ThreadID, andThen, sequence, succeed, spawn)
import Json.Decode exposing (Decoder, list, int, string, (:=), map, object2)
import Signal exposing (Signal, Mailbox, mailbox, send)
import List
---------------------------------
-- THIRD PARTY LIBRARY IMPORTS --
@manfromanotherland
manfromanotherland / css-default-values.css
Last active October 14, 2018 09:01
CSS: properties default/initial values
/* Sources:
* http://reference.sitepoint.com/css
* http://developer.mozilla.org/en/CSS
* https://github.com/peteboere/css-crush/blob/master/misc/initial-values.ini */
.default-values {
animation : none;
animation-delay : 0;
animation-direction : normal;
animation-duration : 0;
@slashdotdash
slashdotdash / README.md
Last active April 9, 2019 12:52
React + D3 (v3)

Multi-series line chart rendered using React and D3.

@romansklenar
romansklenar / REAME.md
Last active February 19, 2020 14:14
How to set up your VPS with Chef Solo

How to set up your VPS with Chef Solo

1. What is it?

There are many different provisioning tools out there, the most popular of which are Chef and Puppet. Chef uses Ruby, Puppet uses a DSL (Domain Specific Language), there are others that use simple bash too, but today we're going to focus on Chef Solo.

2. Dependencies

To get Chef working properly on your local machine you need a few things.

Make sure you use Ruby 1.9.x and not Ruby 2.x as you will get errors with the json 1.6.1 gem on 2.x. Use rbenv or RVM to manage several different Rubies on the one machine.

@mgold
mgold / using_mailboxes_in_elm.md
Last active March 24, 2020 16:05
Using Mailboxes in Elm: a tutorial blog post

Using Mailboxes in Elm

Max Goldstein | July 30, 2015 | Elm 0.15.1

In Elm, signals always have a data source associated with them. Window.dimensions is exactly what you think it is, and you can't send your own events on it. You can derive your own signals from these primitives using map, filter, and merge, but the timing of events is beyond your control.

This becomes a problem when you try to add UI elements. We want to be able to add checkboxes and dropdown menus, and to receive the current state of these elements as a signal. So how do we do that?

The Bad Old Days

@suzuken
suzuken / ua.js
Last active September 9, 2020 15:22
experimental UDF on Bigquery with https://github.com/woothee/woothee-js.
var root = this;
// embed: dataset, util, browser, mobilephone, crawler, appliance, misc, woothee
// GENERATED from dataset.yaml at Thu Aug 13 14:22:28 JST 2015 by tagomoris
// Snapshot from package.json
var package_info = {"name":"woothee","version":"1.2.0","description":"User-Agent string parser (js implementation)","main":"./release/woothee","devDependencies":{"mocha":">= 1.7.0","chai":">= 1.3.0","js-yaml":">= 1.0.3","should":"~1.2.2"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/woothee/woothee-js"},"author":"tagomoris","license":"Apache v2"};
var dataset = {};
(function(){