GRUS has moved to GitHub: https://github.com/emlun/factorio-grus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn pair-with-all-in | |
{ :test #(let [f pair-with-all-in] | |
(is (= [] (f 0 []))) | |
(is (= [ [0 1] ] (f 0 [1]))) | |
(is (= [ [0 1] [0 2] ] (f 0 [1 2]))) | |
) | |
} | |
[ x ys ] | |
(map (fn [y] [x y]) ys)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
autocrlf = input | |
editor = vim | |
[push] | |
default = simple | |
[color] | |
ui = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Clean out Syncthing *.sync-conflict-* files from Password Store | |
# | |
# Usage: Run the script from anywhere with no parameters. | |
# | |
# The script will remove all conflict files in `~/.password-store` for which | |
# the plaintext contents of the original file and the conflict file have the | |
# same SHA256 checksum. I.e. if `foo.sync-conflict-20151115-205258.gpg` and | |
# `foo.gpg` have the same checksums after decrypting, then the former will be | |
# removed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore'); | |
var list1 = [{ id: 0, a: 'a0', b: 'b0' }, { id: 1, a: 'a1', c: 'c1' }]; | |
var list2 = [{ id: 0, c: 'c0', d: 'd0' }, { id: 1, a: 'A1', b: 'b1' }]; | |
var merged = _(list1).chain() | |
.concat(list2) | |
.groupBy('id') | |
.map(function(group, id) { | |
return _(group).reduce(function(result, next) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ls="ls -h --color=auto" | |
alias ll="ls -lh" | |
alias la="ls -lah" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is free and unencumbered text released into the public domain. | |
# For more information, please refer to <http://unlicense.org/> | |
[alias] | |
a = add -up | |
aa = !yes a | git a | |
amend = commit --amend -C HEAD | |
d = diff | |
di = diff --ignore-all-space |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Emil Lundberg <[email protected]> <https://keybase.io/emlun> | |
# | |
# This is free and unencumbered software released into the public domain. | |
# See http://unlicense.org/ for the full license. | |
# | |
# Usage: | |
# | |
# $ confgit ls # List git repositories in ~/.config/ | |
# $ confgit foo init # Clone 'foo.git' from remote into ~/.config/foo/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Utility script for making it easier to sign stuff for Keybase.io with an | |
# airgapped offline key. | |
# | |
# Usage: | |
# 1. Set the `REMOVABLE_DEVICE_UUID` below (see `$ lsblk -o +FSTYPE,UUID`) | |
# 2. Go to keybase.io and add a new key or proof, track someone etc. | |
# 3. Choose to sign manually | |
# 4. Copy the script to the Xorg primary clipboard (should be enough to just | |
# select it all - triple-clicking the text box does the trick in Firefox) |
I hereby claim:
- I am emlun on github.
- I am emlun (https://keybase.io/emlun) on keybase.
- I have a public key whose fingerprint is EB86 2761 6EC1 971D F076 F2FF 2BF5 FD22 FCAB DE73
To claim this, I am signing this object: