Skip to content

Instantly share code, notes, and snippets.

@codebycliff
codebycliff / .rvmrc
Created April 19, 2013 01:25
Some RVM flags
export rvm_path="$HOME/.rvm"
export rvm_pretty_print_flag=1
export rvm_install_on_use_flag=1
export rvm_gemset_create_on_use_flag=1
export rvm_make_flags="-j2"
export rvm_trust_rvmrcs_flag=1
@codebycliff
codebycliff / js-examples.js
Created January 15, 2013 05:05
JS Tidbits
alert(this)
window.alert(window)
location.href = "http://google.com";
var o = new Object();
o.name = "bob";
o.age = 37;
@codebycliff
codebycliff / index.html
Created October 11, 2012 16:31
Hello, CS At Once! 2
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>$title</title>
$styles
</head>
<body>
<h1>$title</h1>
@codebycliff
codebycliff / MapNetworkDrive.ps1
Created October 10, 2012 20:20
PowerShell Snippets
$net = new-object -ComObject WScript.Network
$net.MapNetworkDrive("r:", "\\romeobox\files", $false, "domain\user", "password")
Set-ExecutionPolicy Unrestricted
iex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))
curl -L http://status.calibre-ebook.com/dist/src | tar xvJ cd calibre* sudo python setup.py install
sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main()"
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)