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
type Name = String | |
data Term = Var Name | |
| Con Int | |
| Add Term Term | |
| Lam Name Term | |
| App Term Term | |
data Value = Wrong | |
| Num Int |
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
$ brew install emacs --cocoa --srgb | |
==> Downloading http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3.tar.bz2 | |
File already downloaded in /Users/mitchellh/Library/Caches/Homebrew | |
==> Downloading patches | |
######################################################################## 100.0% | |
######################################################################## 100.0% | |
==> Patching | |
patching file src/ChangeLog | |
patching file src/unexmacosx.c | |
patching file lisp/term/ns-win.el |
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
Day job: Operations Engineer | |
Your Rails contributions (if any): None | |
What's your Ruby/Rail experience?: Was a Rails consultant for 3.5 years, switched to Python and now do Ops work. | |
How do you use GitHub?: Open source projects, issues, wiki, site hosting, as well as corporate git hosting. |
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 python | |
""" | |
This Python scripts listens for all HTTP requests to the | |
Turntable CDNs and downloads the file requested into the | |
current directory. | |
Disclaimer: This is a proof of concept. The author of this | |
script is not responsible for how this is used. | |
""" |
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 python | |
""" | |
This Python scripts listens for all HTTP requests to the | |
Turntable CDNs and downloads the file requested into the | |
current directory. | |
Disclaimer: This is a proof of concept. The author of this | |
script is not responsible for how this is used. | |
""" |
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
sudo sed -i -r -e 's/http:\/\/(.+)\.ec2/http:\/\/us/' /etc/apt/sources.list |
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
""" | |
Contains reCaptcha fields for WTForms which can be used | |
for various forms. This library depends on `recaptcha-client` ~> 1.0.6. | |
Example usage is below. | |
Defining a form with a ``RecaptchaField``: | |
from wtforms import Form | |
from recaptcha_field import RecaptchaField |
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
Vagrant::Config.run do |config| | |
# ... | |
config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
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
# Putting this at the top of your "base" recipe or some common recipe that | |
# is loaded very early on will force Chef to only run one process at a time. | |
# This is enforced using a file lock. The file lock is automatically released | |
# when the process exits, so there is no need to explicitly do so. | |
#---------------------------------------------------------------------- | |
# Obtain File Lock | |
#---------------------------------------------------------------------- | |
$_chef_lock_file = File.open(File.join(Chef::Config[:file_cache_path], "chef_lock"), "w+") | |
if $_chef_lock_file.flock(File::LOCK_EX | File::LOCK_NB) === false |
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
;; Fullscreen is a bit different on OS X | |
(defun toggle-fullscreen (&optional f) | |
(interactive) | |
(let ((current-value (frame-parameter nil 'fullscreen))) | |
(set-frame-parameter nil 'fullscreen | |
(if (equal 'fullboth current-value) | |
(if (boundp 'old-fullscreen) old-fullscreen nil) | |
(progn (setq old-fullscreen current-value) | |
'fullboth))))) |