This file contains 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
class Access { | |
constructor(path = []) { | |
this.path = path; | |
} | |
// Proxy | |
get(target, prop) { | |
console.log("Packing", prop); | |
return new Proxy(target, new Access([...this.path, o => o[prop]])); | |
} |
This file contains 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] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
cp = cherry-pick | |
rb = rebase | |
hist = log --pretty=format:\"%C(yellow)%h%Creset %Cgreen%ad%Creset | %s%Cblue%d%Creset %Cgreen[%an]%Creset\" --graph --date=short | |
type = cat-file -t | |
dump = cat-file -p |
This file contains 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
#! /usr/bin/env bash | |
function closefd() { | |
exec 0>&- # close stdin | |
exec 0<&- | |
exec 1>&- # close stdout | |
exec 1<&- | |
exec 2>&- # close stderr | |
exec 2<&- | |
} |
This file contains 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
#!/usr/bin/env scala | |
//!# | |
import scala.language.postfixOps | |
import scala.io.Source | |
import scala.util.parsing.combinator._ | |
/* The MIT License (MIT) | |
* | |
* Copyright (c) 2013 Adrien Lavoillotte |
This file contains 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
// in './src/main/scala' | |
package com.stackoverflow.legal | |
import fr.splayce.rel._ | |
import Symbols._ | |
import Implicits._ | |
object Legal { |
This file contains 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
/** | |
* Remove diacritics (accent and other marks) on characters, and dissociate double characters. | |
* Based on the character map of http://lehelk.com/2011/05/06/script-to-remove-diacritics/ | |
* but per-character walk (improved performance). | |
* | |
* Licensed under WTFPL v2 http://sam.zoy.org/wtfpl/COPYING | |
*/ | |
var removeDiacritics = (function() { | |
var diacritics = {"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B", |