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
<!DOCTYPE html> | |
<html><head><meta charset="utf-8"><!-- | |
Ok, let me be honest here… | |
DISCLAIMER: | |
I drew inspiration and a little CSS from the now defunct | |
http://whatthekeycode.com/ | |
Still, it's different in a lot of ways. |
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
# For these... | |
HOST="1.2.3.4/24" | |
NET="1.2.3.0/24" | |
GATEWAY_IP="1.2.3.1" | |
# Set a static IP | |
ip addr add $HOST dev eth0 | |
ip route add $NET via $GATEWAY_IP | |
ip link set eth0 up |
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
var escapeHTML = (function() { | |
var regexp = /[<>&'"\/]/g | |
, replacements = | |
{ '&': '&' | |
, '<': '<' | |
, '>': '>' | |
, '/': '/' | |
, '"': '"' | |
, "'": ''' | |
} |
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
function spliceRevertable() { | |
var self = this | |
, revertArray = [arguments[0], arguments.length - 2] | |
, result = revertArray.splice.apply(this, arguments) | |
, revertArguments = revertArray.concat(revertArray.slice.call(arguments, 2)) | |
result.revert = funtion() { | |
return revertArguments.splice.apply(self, revertArguments) | |
} | |
return result | |
} |
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
package main | |
import ( | |
"encoding/binary" | |
"flag" | |
"fmt" | |
"io" | |
"os" | |
"runtime" | |
"sort" |
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
import ( | |
"database/sql" | |
"fmt" | |
"reflect" | |
) | |
type Field interface { | |
Name() string | |
Ptr() interface{} | |
Tags() string |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"math/big" | |
"os" | |
) | |
func generateIntBounds(w io.Writer) { |
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
// see http://godoc.org/github.com/arnehormann/goof/envflag | |
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
"sort" | |
"strings" | |
"text/tabwriter" |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
"os" | |
"time" | |
pipe "gopkg.in/pipe.v2" | |
) |
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
#!/bin/bash | |
set -e -u -o pipefail # -x | |
echo $'Project\tCommit\tBranch\tFiletype\tLines' | |
for dir in *.git; do | |
export GIT_DIR="$dir" | |
export PREFIX=$(git for-each-ref --count=1 --sort=committerdate --format=$'%(objectname)\t%(refname)') | |
export BRANCH=$(echo -e "${PREFIX}" | cut -d $'\t' -f 1) | |
##### from these filetypes ##### | |
for filetype in java cs rb go py as php html htm css js json xml conf cnf; do | |
echo -n -e "${dir}\t${PREFIX}\t${filetype}\t" |