I hereby claim:
- I am danielpcox on github.
- I am danielpcox (https://keybase.io/danielpcox) on keybase.
- I have a public key whose fingerprint is D085 A81C CE7C 291D 7A9E 1F70 14DA 0F0F BB08 2FEE
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| func Sqrt(x float64) float64 { | |
| z := 1.0 | |
| l := 0.0 |
| def hex_to_bytes(str) | |
| str.chars.each_slice(2).map {|s| s.join.to_i(16)} | |
| end | |
| def hex_to_bits(str) | |
| str.chars.each_slice(2).flat_map {|s| s.join.to_i(16).to_s(2).rjust(8,"0").split("")} | |
| end | |
| def bytes_to_binary(bytes) | |
| bytes.flat_map {|b| b.to_s(2).rjust(8,"0").split("")} |
| ; Solving 4Clojure 44 | |
| ; first try | |
| (def rotate | |
| (fn [n xs] | |
| (if (= n 0) | |
| xs | |
| (let [nextn (* (dec (Math/abs n)) (if (< n 0) -1 1)) | |
| nextxs (and (not= 0 n) | |
| (if (< n 0) |
| (ns deep-merge-spec | |
| (:require [midje.sweet :refer :all] | |
| [util :as u])) | |
| (fact (u/deep-merge {:one 1 :two 2} | |
| {:one 1 :two {}}) | |
| => {:one 1 :two {}}) | |
| (fact (u/deep-merge {:one 1 :two {:three 3 :four {:five 5}}} | |
| {:two {:three {:test true}}}) |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # Runs the specified command (all arguments together) in all tmux panes in the current window | |
| # Notate which window/pane we were originally at | |
| window=`tmux display-message -p '#I'` | |
| ORIG_PANE_INDEX=`tmux display-message -p '#P'` | |
| command=$@ |
| $ git clone blahblahblah # <-- fresh clone of the repo | |
| $ du -sh . | |
| 768M # <-- holy macaroni, that's huge | |
| $ git filter-branch --subdirectory-filter path/to/subdir --prune-empty --tag-name-filter cat -- --all # <-- Actual filter | |
| ... | |
| ### Now we'll delete all references to those unchanged refs | |
| $ git reflog expire --expire=now --all # <-- expire the reflog refs |
Spins up a very simple VM and installs a few important things.