This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.define :server do |server_config| | |
server_config.vm.customize ["modifyvm", :id, "--name", "server", "--memory", "1024"] | |
server_config.vm.box = "precise64_ruby193p194" | |
server_config.vm.box_url = "https://s3.amazonaws.com/kazumlabs-vagrant-boxes/precise64_ruby193p194.box" | |
server_config.vm.host_name = "server" | |
server_config.vm.forward_port 22, 2222, :auto => true |
This file contains 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 'rubygems' | |
require 'chef/config' | |
require 'chef/webui_user' | |
Chef::Config.from_file(File.expand_path("~/.chef/knife.rb")) | |
user = Chef::WebUIUser.load('admin') | |
user.set_password("MyAwesomePassword") | |
user.save |
This file contains 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
# Add this to your .bash_profile, or where ever you prefer. | |
function tname { | |
printf "\e]1;$1\a" | |
} | |
function wname { | |
printf "\e]2;$1\a" | |
} |
This file contains 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
alias la='ls -a' | |
alias ll='ls -alF' | |
alias df="df -h" | |
alias ping="ping -c 4" | |
alias sping="sudo ping -i 0.1" | |
alias tb="torquebox" | |
alias xcode="open -a /Application/Xcode.app" | |
# http://alias.sh |
This file contains 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
#!/bin/bash | |
mkdir ~/.bundle | |
curl https://gist.githubusercontent.com/Toady00/3769131/raw/4fef2f8f0e007ba37058ff3a2b31d45bc08f613b/bundle_config > ~/.bundle/config | |
curl https://gist.githubusercontent.com/Toady00/3769131/raw/d1402476a0f0aba91cdbe2180668b6ca48fe586f/.bash_aliases > ~/.bash_aliases | |
curl https://gist.githubusercontent.com/Toady00/3769131/raw/32fb14f7deb0670bbcd76c579d4fa9cca087ca85/.bash_profile > ~/.bash_profile | |
curl https://gist.githubusercontent.com/Toady00/3769131/raw/be799a6eef7fa4fac7e50f56d99079037a50e27a/.bash_prompt > ~/.bash_prompt | |
curl https://gist.githubusercontent.com/Toady00/3769131/raw/777a96d5b812f0bb05a50b5403b87eef82f6f495/.bash_rvm > ~/.bash_rvm | |
curl https://gist.githubusercontent.com/Toady00/3769131/raw/9834cfdbf5bb642fdd3e9e4090f7157920072f35/.bash_nvm > ~/.bash_nvm |
This file contains 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
<div class='particles'></div> |
This file contains 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
$ rake torquebox:remote:exec["chmod +x $TORQUEBOX_HOME/stage/blog/vendor/bundle/jruby/1.9/bin/*"] | |
SyntaxError: /bin/chmod:1: Invalid char `\177' ('') in expressionELF>è#@@0Ã@8 @@@@@ø88@8@@@¶¶ ¾ ¾` ¾ H¾H¾`H¾`TT@T@DDPåtdx x @x @QåtRåtd ¾ ¾` ¾`àà/lib64/ld-linux-x86-64.so.2GNUGNU=ÿä¨N¯2áIÚ|áçÜê(<¢!@ | |
hH" <@G(ÜKaÆ | |
9ûpò¼Pvð|Bà Î,cräbAõ9ò2Ä÷²¢÷§ÿÅâ¹!O¿!å>m:fë#ÂGI^`Ýpa2 | |
s {f×*5t9ΰy©=(2y±¯ÀÞB PP¡ o@-WPe@Å TPo@ô@Â0@`@Å!pÂpÂð!@»xÂW`Â`©hÂd@5__gmon_start__libc.so.6fflushstrcpy__printf_chkreaddirsetlocalembrtowcstrncmpoptindstrrchrdcgettextclosedirfchdirerror__stack_chk_fail__lxstatiswprintreallocfstatfsabort_exitprogram_invocation_name__assert_fail__ctype_get_mb_cur_maxfts_closecallocstrlenmemset__errno_locationmemcmpfchmodat__fprintf_chkstdoutfts_readlseekmemcpyfclosemallocumaskfd |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.define :zk1 do |zk_config| | |
zk_config.vm.network :private_network, ip: "192.168.123.10" | |
zk_config.vm.box = "precise64" | |
end | |
end |
This file contains 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
class DupTest | |
def initialize(options = {}) | |
options = options.dup | |
options[:from_init] = true | |
puts options | |
end | |
end | |
# => nil | |
options = {from_init: false} |
This file contains 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
# irb session using: jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_13-b20 [darwin-x86_64] | |
Time.new(2013, 1, 1, 12, 0, 0, "-05:00") | |
#=> 2013-01-01 12:00:00 +0500 | |
Time.new(2013, 1, 1, 12, 0, 0, "+05:00") | |
#=> 2013-01-01 12:00:00 -0500 |
OlderNewer