curl -s https://gist.githubusercontent.com/nicerobot/fef144c9328b487e85f7a6ccbd5f70bc/raw/kubectl | bash -s -- apply
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
.PHONY: test | |
test: | |
go test -v |
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
object Story { | |
object Once { def upon = (x: a.type) => x } | |
object a { def time = (x: languages.type) => x } | |
object languages { def were = (x: inflexible.type) => x } | |
object inflexible { def along = (x: came.type) => x } | |
object came { def Scala = (x: inflexible.type) => x } | |
implicit def string(s : String) : inflexible.type = inflexible | |
def main(args: Array[String]): Unit = { | |
Once upon a time languages were inflexible; "Then " along came Scala ". The End!" |
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
# look and feel | |
caption always "%{= bb}%{+b w}%h %=%{=b rw} %l %{= db} ${USER}@%H %{= dg}%c" | |
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" | |
# skip the startup message | |
startup_message off | |
# go to home dir | |
chdir |
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
// This is an example of how to reason about covariance vs contravariance. | |
// Between the two co*.reasoning.scala examples, the following compiles but meaning is slightly different due to the class hierarchy. | |
type SHORT = A[SMALL] | |
type INT = A[MEDIUM] | |
type LONG = A[LARGE] | |
val s:SHORT = new SHORT() | |
val i:INT = s |
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
// 1. Navigate to your Activity Log | |
// 2. Paste this into the JavaScript Console | |
function clickDelete() { | |
document.querySelectorAll('[aria-label="Move to Trash"]')[0].click() | |
} | |
function clickMenu() { | |
document.querySelectorAll('[role="menuitem"]')[2].click(); | |
setTimeout(clickDelete, 250); | |
} |
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 | |
curl -ks https://gist.githubusercontent.com/nicerobot/1622504/raw/gist-backup.py | USER=${USER} python3 |
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/sh | |
policy=${HOME}/.jstatd.all.policy | |
[ -r ${policy} ] || cat >${policy} <<'POLICY' | |
grant codebase "file:${java.home}/../lib/tools.jar" { | |
permission java.security.AllPermission; | |
}; | |
POLICY | |
jstatd -J-Djava.security.policy=${policy} & |
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/sh | |
# curl -Lks https://raw.github.com/gist/3889839/jenkins.sh | sudo sh -s | |
# from http://mattonrails.wordpress.com/2011/06/08/jenkins-homebrew-mac-daemo/ | |
# open http://localhost:8080 | |
brew list jenkins || brew install jenkins | |
mkdir /var/jenkins | |
/usr/sbin/dseditgroup -o create -r 'Jenkins CI Group' -i 600 _jenkins | |
dscl . -append /Groups/_jenkins passwd "*" | |
dscl . -create /Users/_jenkins | |
dscl . -append /Users/_jenkins RecordName jenkins |