Atom editor backup
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
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/danrigsby/9025749/raw/a915773f5812c02aa45185e486ec543e01cf9ed0/dev_setup.ps1'))" |
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 | |
# example: sudo sh ./install-env-var.sh "FOO=bar" "BAR=foo" | |
for ARG in "$@" | |
do | |
echo "*** installing environment variable: $ARG ***" | |
export $ARG | |
if ! grep -q "${ARG}" "$HOME/.profile"; then | |
echo ${ARG} >> $HOME/.profile |
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
.directive('setFocus', function ($timeout) { | |
return function ($scope, $element, $attr) { | |
if($attr.setFocus !== false) { | |
var timeout = 750; // wait 750 ms before evaluating | |
var focus = true; | |
if ($attr.setFocus) { | |
// if we have focus criteria, then evaluate it against the scope (ex: set-focus="myValue === 1") | |
focus = $scope.$eval($attr.setFocus); | |
} |
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
# Recipe for play-2.1.5 | |
require 'formula' | |
class Play < Formula | |
homepage 'http://www.playframework.org/' | |
url 'http://downloads.typesafe.com/play/2.1.5/play-2.1.5.zip' | |
# For integrity and security, we verify the hash (`openssl dgst -sha1 <FILE>`) | |
sha1 '0c92e9c0c0e7ddfba0ef8a2f730c5cbcd6ebc377' | |
version '2.1.5' |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.092175714671611786</real> | |
<key>Green Component</key> | |
<real>0.078538775444030762</real> |
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 React from 'react-native'; | |
var { | |
AsyncStorage | |
} = React; | |
var LocalStorage = { | |
get: function (key) { | |
return AsyncStorage.getItem(key).then(function(value) { | |
return JSON.parse(value); | |
}); |
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
kubectl get secrets -o json --namespace old | jq '.items[].metadata.namespace = "new"' | kubectl create -f - |
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
packer build packer.json 2>&1 | sudo tee output.txt | |
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt |