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
671ff0e7b1f416c3b04ab80e0a9d14d07b28fc598d29ac7926ef73672477780d |
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
b7b9867e7de60dbc0b8dd2151ec5bca82297d38c094a2e56c61a8d34bb859972 |
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
foo → ruby -v | |
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0] | |
foo → time vagrant -h | |
Tasks: | |
vagrant box # Commands to manage system boxes | |
vagrant destroy # Destroy the environment, deleting the created virtual machines | |
vagrant halt # Halt the running VMs in the environment | |
vagrant help [TASK] # Describe available tasks or one specific task | |
vagrant init [box_name] [box_url] # Initializes the current folder for Vagrant usage | |
vagrant package # Package a Vagrant environment for distribution |
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
Last login: Tue Jan 10 17:14:06 on ttys004 | |
foo → ruby -v | |
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0] | |
foo → time ruby test.rb | |
HELLO! | |
real 0m0.022s | |
user 0m0.017s | |
sys 0m0.005s | |
foo → time ruby test.rb |
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
# Forwarded port configurations were changed so that they no longer | |
# require a unique name: | |
# Before | |
config.vm.forward_port "http", 80, 8080 | |
# After | |
config.vm.forward_port 80, 8080 | |
# After (if you still want to name it you can, optionally) |
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))))) |
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
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
""" | |
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
sudo sed -i -r -e 's/http:\/\/(.+)\.ec2/http:\/\/us/' /etc/apt/sources.list |