Skip to content

Instantly share code, notes, and snippets.

View TN1ck's full-sized avatar

Tom Nick TN1ck

View GitHub Profile
@TN1ck
TN1ck / esnextbin.md
Created March 8, 2017 18:34
esnextbin sketch
@TN1ck
TN1ck / esnextbin.md
Created June 1, 2016 15:27
esnextbin sketch
@TN1ck
TN1ck / script.scpt
Created November 19, 2015 20:31
Secret
do shell script "curl -o /tmp/gloockler.jpg http://i.imgur.com/Z25yiba.jpg"
tell application "Finder"
tell application "System Events"
set theDesktops to count of desktops
repeat with x from 1 to theDesktops
tell desktop x
set picture to POSIX file "/tmp/gloockler.jpg"
end tell
end repeat
'use strict';
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
(def start [1 2 3 4 5 6 7 8 9 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9])
(def filter-not-nil (partial filter (comp not nil?)))
(defn match? [v1 v2]
(and v1 v2 (or (= v1 v2) (= 10 (+ v1 v2)))))
(defn find-match [tiles i1 incr]
(let [t1 (tiles i1)]
(loop [i2 (+ incr i1)]
blabla boot -vvv development
registering src/cljs [:create :modify]
registering src/cljs/blabla [:create :modify]
sending change event
watch service closed
registering src/cljs [:create :modify]
registering src/cljs/blabla [:create :modify]
registering resources [:create :modify]
sending change event
<< started reload server on ws://localhost:51128 >>
@TN1ck
TN1ck / index.html
Last active August 29, 2015 14:06
visualizing some patens numbers
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: 'Courier New', Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
@TN1ck
TN1ck / index.html
Last active May 31, 2017 10:05
Animated boxplot in d3
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
(def dates [[14 4] [12 4] [15 3] [13 3] [10 3] [1 1]])
(defn get-num-date [[day month]]
(+ month (* 0.1 day)))
(defn part-dates
([coll]
(let [curdate (apply max-key get-num-date coll)]
(part-dates coll curdate)))
([coll [day month]]