Spins up a very simple VM and installs a few important things.
- Install VirtualBox
- Install Vagrant
| package rmt.analytics.tagger.configuration; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.IOException; | |
| import java.util.Properties; | |
| import org.apache.logging.log4j.LogManager; | |
| import org.apache.logging.log4j.Logger; |
| #!/bin/bash | |
| # Usage: retrync path/to/thing/locally user@host:/path/where/you/want/it/remotely | |
| trap "echo Exited!; exit;" SIGINT SIGTERM | |
| false | |
| while [ $? -ne 0 ] | |
| do |
Spins up a very simple VM and installs a few important things.
| $ 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 |
| #!/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=$@ |
I hereby claim:
To claim this, I am signing this object:
| (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}}}) |
| ; 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) |
| 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("")} |
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| func Sqrt(x float64) float64 { | |
| z := 1.0 | |
| l := 0.0 |