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
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
set show-all-if-ambiguous on | |
set completion-ignore-case on |
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
# Dynamically creating the correct url for downloading elasticsearch package via version number | |
download_url = "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.10.deb" # can we say elasticsearch one more time? | |
template = '<%= "https://download.#{@domain}.org/#{@domain}/#{@domain}/#{@domain}-#{@major}.#{@minor}.#{@patch}.deb" %>' | |
vars = {domain: 'elasticsearch', major: 0, minor: 90, patch: 10} | |
url_template = UrlTemplate.new(template, vars) | |
url_template.url == download_url |
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
# This assumes you prefixed all the svn branches with 'svn/' via the | |
# --prefix=svn/ option when you performed the initial clone. Otherwise | |
# replace 'svn/trunk' with the name of your branch that corresponds to | |
# trunk. | |
git svn fetch --revision [start_revision_number]:[end_revision_number] | |
GRAFT_PARENT_GIT=`git log --pretty=format:'%H' -1 master | |
GRAFT_FIRST_SVN=`git log --pretty=format:'%H' svn/trunk | tail -n` # or whatever you called your trunk | |
echo $GRAFT_PARENT_GIT $GRAFT_FIRST_SVN > .git/info/grafts | |
git checkout master |
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 |
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
# -*- 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
$ 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
<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
#!/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
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 |