This file contains hidden or 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 | |
set -eou pipefail | |
readonly USERNAME="$1" | |
if [[ $(grep "$USERNAME" whitelist.txt ) ]];then | |
echo "Already on list" | |
exit 2 | |
else |
This file contains hidden or 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
ngrok (Ctrl+C to quit) | |
Tunnel Status online | |
Version 1.7/1.6 | |
Forwarding http://a5c92a1.ngrok.com -> 127.0.0.1:4567 | |
Forwarding https://a5c92a1.ngrok.com -> 127.0.0.1:4567 | |
Web Interface 127.0.0.1:4040 | |
# Conn 0 | |
Avg Conn Time 0.00ms |
This file contains hidden or 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 'pp' | |
require 'sinatra' | |
get '/' do | |
key_env = env.dup | |
useful = key_env.delete_if { |k, v| !k[/^HTTP_/] }.sort | |
useful.map do |k,v| | |
"#{k} => #{ v }" | |
end.join("<br>") | |
end |
This file contains hidden or 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
# Ruby failing to compile with a 137 exit code & Fail to compile RI Docs? | |
# Use the --disable-install-doc flag | |
# Credit: http://stackoverflow.com/a/15502089/1930671 | |
ruby-install ruby 2.1 -- --disable-install-doc |
This file contains hidden or 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
source /usr/local/share/chruby/chruby.sh | |
# RUBIES+=(~/.rvm/rubies/*) | |
source /usr/local/share/chruby/auto.sh | |
# Credit: https://github.com/postmodern/chruby/wiki/Implementing-an-'after-use'-hook | |
save_function() | |
{ | |
local ORIG_FUNC="$(declare -f $1)" | |
local NEWNAME_FUNC="$2${ORIG_FUNC#$1}" | |
eval "$NEWNAME_FUNC" |
This file contains hidden or 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
client | |
dev tun | |
comp-lzo | |
remote-cert-tls server | |
server-poll-timeout 10 | |
auth-user-pass | |
auth-nocache | |
auth-retry interact | |
verb 1 | |
remote openvpn.getcloakvpn.com 443 udp |
This file contains hidden or 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
" Hack for speeding up vim load when using rvm | |
"let g:ruby_path = system('rvm use system') | |
"" Uses infect.gem to package install all these suckers | |
"=bundle tpope/vim-pathogen | |
""=bundle tpope/vim-sensible | |
source ~/.vim/bundle/vim-pathogen/autoload/pathogen.vim | |
execute pathogen#infect('bundle/{}') | |
" Erlang |
This file contains hidden or 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
(ns employee-vs-contractor.core) | |
(def pct 100) | |
(defn health-insurance [health-insurance percent] | |
"Calculates the value of health insurance coverage. Provide percent as [100]" | |
(let [months 12.0] | |
(/ (* months health-insurance percent) pct))) | |
(defn vacation [salary paid-days work-days] |
This file contains hidden or 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
while read -r line | |
do | |
echo "$line" | |
done < <(jobs) |
This file contains hidden or 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_from_path(){ | |
local item="$1" | |
cleansed_path=$(echo -n $PATH | tr ':' "\n" | grep -v "^${item}$" | grep -v '^$' | tr "\n" ':') | |
export PATH=$cleansed_path | |
} | |
_add_to_path(){ | |
local item="$1" | |
export PATH=${item}:$PATH | |
} |