Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
if [[ $# != 2 ]] ; then
echo "Usage: $0 <domain name> <hostname not including domain name>"
exit 1
fi
if ! command -v dnsimple >/dev/null 2>/dev/null ; then
echo 'You must have the dnsimple command line tool installed and in your $PATH.'
echo "Try 'gem install dnsimple-ruby' and then make a $HOME/.dnsimple config file."

Keybase proof

I hereby claim:

  • I am chorn on github.
  • I am chorn (https://keybase.io/chorn) on keybase.
  • I have a public key whose fingerprint is 3FF7 C580 CED8 6440 B813 5BDE F198 A177 3676 6A96

To claim this, I am signing this object:

#!/usr/bin/env bash
newssl() {
case "$1" in
rsa|-rsa|--rsa|-r) openssl genrsa -out key.pem 1024 >&/dev/null ;;
dsa|-dsa|--dsa|-d) openssl dsaparam -noout -out key.pem -genkey 1024 >&/dev/null ;;
ec|-ec|--ec|-e) openssl ecparam -out key.pem -name sect571k1 -genkey >&/dev/null ;;
*) echo "newssl <rsa|dsa|ec> <hostname>" ; return ;;
esac
openssl req -new -x509 -days 3650 -subj "/C=US/ST=New York/L=Rochester/CN=$2" -key key.pem -out "$2.pem" >&/dev/null
$ echo $PATH
/Users/chorn/.rvm/gems/ruby-2.1.2/bin:/Users/chorn/.rvm/gems/ruby-2.1.2@global/bin:/Users/chorn/.rvm/rubies/ruby-2.1.2/bin:/Users/chorn/.rvm/bin:/Users/chorn/bin:/Applications/Postgres.app/Contents/Versions/9.4/bin:/Applications/VMware Fusion.app/Contents/Library:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/Applications/LibreOffice.app/Contents/MacOS:/usr/local/Cellar/macvim/HEAD/MacVim.app/Contents/MacOS:/usr/X11/sbin:/usr/X11/bin:/usr/local/sbin:/usr/local/bin:/opt/X11/sbin:/opt/X11/bin:/opt/local/sbin:/opt/local/bin:/opt/sbin:/opt/bin:/usr/sbin:/usr/bin:/sbin:/bin
$ bin/rails -v
Rails 4.0.4
$ rails -v
Rails 4.0.4
$ bundle exec rails -v
export LESS="irQ"
export HISTCONTROL=ignoreboth
export HISTFILESIZE=10000000
export HISTSIZE=1000
export INPUTRC="$HOME/.bash_inputrc"
export MAILCHECK=0
export PS1='\t \u@\h \w \$ '
umask 022
set -o emacs -o monitor -o notify
#!/usr/bin/env ruby_executable_hooks
#
# This file was generated by RubyGems.
#
# The application 'rails' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
@chorn
chorn / gcc49.rb
Created July 8, 2014 11:53
OS X Homebrew Formula compatible with Yosemite (10.10) and Xcode6 Beta as of 2014-07-08
require 'formula'
class Gcc49 < Formula
def arch
if Hardware::CPU.type == :intel
if MacOS.prefer_64_bit?
'x86_64'
else
'i686'
end
unset __messy_path
unset __cleaned_path
unset __path_check
declare -A __path_check
__messy_path+=(/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin /Applications/VMware\ Fusion.app/Contents/Library /Applications/Postgres.app/Contents/Versions/{9.3,9.4}/bin /{usr,opt}/{local,X11}/{bin,sbin} $HOME/bin)
__messy_path+=($(IFS=:; echo $PATH))
__messy_path+=(/{usr,opt}/{bin,sbin} /{bin,sbin})
unset __messy_path
unset __cleaned_path
unset __path_check
declare -A __path_check
__messy_path+=(/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin /Applications/VMware\ Fusion.app/Contents/Library /Applications/Postgres.app/Contents/Versions/{9.3,9.4}/bin /{usr,opt}/{local,X11}/{bin,sbin} $HOME/bin)
__messy_path+=($(IFS=:; echo $PATH))
__messy_path+=(/{usr,opt}/{bin,sbin} /{bin,sbin})

Keybase proof

I hereby claim:

  • I am chorn on github.
  • I am chorn (https://keybase.io/chorn) on keybase.
  • I have a public key whose fingerprint is 5694 FB04 DD13 19D0 5C5D 8A10 65CB EA2B 9A68 DAB3

To claim this, I am signing this object: