I hereby claim:
- I am yorickvp on github.
- I am yorickvp (https://keybase.io/yorickvp) on keybase.
- I have a public key ASDL4mFp5PyVeysyX677R1QZi-KBg5DoPBa8wf3CMcq4ego
To claim this, I am signing this object:
| { pkgs ? (import <nixpkgs> {}) | |
| , stdenv ? pkgs.stdenv | |
| , xdotool ? pkgs.xdotool | |
| , makeWrapper ? pkgs.makeWrapper | |
| , wmctrl ? pkgs.wmctrl | |
| , fetchFromGitHub ? pkgs.fetchFromGitHub | |
| , bash ? pkgs.bash | |
| , python3 ? pkgs.python3 | |
| , libinput ? pkgs.libinput | |
| , procps ? pkgs.procps |
I hereby claim:
To claim this, I am signing this object:
| node_modules |
| let | |
| pkgs = import <nixpkgs> {}; | |
| pypkg = pkgs.python27Packages; | |
| in | |
| { stdenv ? pkgs.stdenv, python27 ? pkgs.python27, fetchFromGitHub ? pkgs.fetchFromGitHub, | |
| virtualenv ? pypkg.virtualenv, pip ? pypkg.pip, setuptools ? pypkg.setuptools }: | |
| let | |
| inherit (pkgs.lib) concatMapStringsSep mapAttrsToList concatStringsSep; | |
| deps = { | |
| # the script fetches two other repos from github |
| WateringCan: | Kiwi Beet Corn | |
| Pumpkin: | Carrot Potato | |
| Sugarcane: | Carrot Wheat | |
| Melon: | Carrot Pumpkin | |
| Dandelion: | Melon Sugarcane | |
| Poppy: | Pumpkin Sugarcane | |
| BlueOrchid: | Poppy Dandelion | |
| Daisy: | BlueOrchid Dandelion | |
| Allium: | BlueOrchid Poppy |
| import Data.List | |
| -- import Debug.Trace | |
| data Node a = DeadEnd a | |
| | Passage a (Node a) | |
| | Fork a (Node a) (Node a) | |
| instance (Show a) => Show (Node a) where | |
| show (DeadEnd a) = "DeadEnd " ++ show a | |
| show (Passage a _) = "Passage " ++ show a | |
| show (Fork a _ _) = "Fork " ++ show a |
| -- shiny and exciting O(n log n) algorithm | |
| -- the n parameter and the idea to use something like merge sort is from Bird | |
| -- both of those things are really clever | |
| join :: Ord a => Int -> [(a, Int)] -> [(a, Int)] -> [(a, Int)] | |
| join 0 ax [] = ax -- n corresponds to length b, so if b is empty n = 0 | |
| join n [] bx = bx | |
| -- something like merge sort but slightly different | |
| join n ax@((a, ac):as) bx@((b, bc):bs) | |
| | a < b = (a, ac + n) : join n as bx |
| function RPS(noPlayers, proto) { | |
| var obj = Object.create(proto || RPS.prototype) | |
| obj.players = noPlayers | |
| obj.score = {} | |
| obj.moves = {} | |
| for (var i = 0; i < noPlayers; i++) { | |
| obj.score[i] = 0 | |
| obj.moves[i] = [] } | |
| return obj } |
| // ==UserScript== | |
| // @name Warn when you're about to tweet "thanks to me" | |
| // @namespace http://localhost/ | |
| // @version 0.1 | |
| // @description Add an alert whenever someone types "thanks to me" | |
| // @match http://twitter.com/* | |
| // @match https://twitter.com/* | |
| // ==/UserScript== | |
| (function() { |
| // keeps track of connections to a http server and closes them when the server closes. | |
| function LinkedList() { | |
| this.start = null | |
| this.end = null } | |
| LinkedList.prototype.add = function(data) { | |
| var ref = { data: data, next: null, prev: null } | |
| if (!this.start) this.start = ref | |
| if (this.end) { |