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 update-awscli-mfa() { | |
if [ "x$1" = "x" ]; then | |
echo "update-awscli-mfa <mfa code>" | |
return 1 | |
fi | |
device=$(sed -n '/^\[mfa/,/^\[/p' ~/.aws/credentials|awk '$1=="aws_mfa_device"{print $3}') | |
if [ "x$device" = "x" ]; then | |
echo "no mfa profile or aws_mfa_device found in ~/.aws/credentials" | |
return 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
$ yarn run test | |
yarn run v1.13.0 | |
$ jest --env node --verbose --coverage | |
FAIL test/index.test.js | |
● Test suite failed to run | |
custom keyword definition is invalid: data/errors should be boolean | |
at Ajv.addKeyword (node_modules/ajv/lib/keyword.js:65:13) | |
at Object.<anonymous>.module.exports (node_modules/ajv-errors/index.js:10:7) |
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" | |
"log" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { |
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
$ cat << EOF > .gitattributes | |
*.yaml export-ignore | |
EOF | |
git archive --worktree-attributes --format=tgz HEAD > repo.tgz |
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
export PYENV_VIRTUALENV_DISABLE_PROMPT=1 | |
function updatePrompt { | |
PS1="\u@\h:\W\$ " | |
if [[ $VIRTUAL_ENV != "" ]]; then | |
PS1="(${VIRTUAL_ENV##*/})$PS1" | |
fi | |
} | |
export PROMPT_COMMAND='updatePrompt' |
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
boot2docker ssh | |
sudo sh -c "cat <<EOF > /var/lib/boot2docker/profile" | |
export HTTP_PROXY=<proxy> | |
export HTTPS_PROXY=<proxy> | |
export NO_PROXY=/var/run/docker.sock | |
wait4eth1() { | |
CNT=0 | |
until ip a show eth1 | grep -q 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
require "formula" | |
class Emacs < Formula | |
homepage "https://www.gnu.org/software/emacs/" | |
stable do | |
url "http://ftpmirror.gnu.org/emacs/emacs-24.4.tar.xz" | |
mirror "https://ftp.gnu.org/pub/gnu/emacs/emacs-24.4.tar.xz" | |
sha256 "47e391170db4ca0a3c724530c7050655f6d573a711956b4cd84693c194a9d4fd" |
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
$ xcode-select --install |
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
/etc/systemd/logind.conf | |
HandleLidSwitch=ignore |
NewerOlder