Skip to content

Instantly share code, notes, and snippets.

View script.scpt
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
View gist:2571fe89aac13036d910
'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',
View solver.clj
(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)]
View boot error
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 Aug 29, 2015
visualizing some patens numbers
View index.html
<!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
Animated boxplot in d3
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
View relative date partitioning in clojure.clj
(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]]