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
Install ansible on your laptop, then: | |
ansible-playbook -i production site.yml | |
After running this confirm ruby version on the server: | |
ubuntu@srv-blah:~$ which ruby | |
/usr/bin/ruby | |
ubuntu@srv-blah:~$ ruby -v | |
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux-gnu] |
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
# A sample Gemfile | |
source "https://rubygems.org" | |
gem 'rugged', :git => 'https://github.com/libgit2/rugged.git', :branch => 'development', :submodules => true, :ref => 'fb28f860679f3a4bb29a9d1579f3b13754d81374' |
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
# Running tests: | |
...........EF..................FFFFFFFFFF | |
Finished tests in 42.043389s, 0.9752 tests/s, 2.1406 assertions/s. | |
Error: | |
test: MergeRequestsShow should display watch/unwatch for signed in user. (MergeRequestsShowTest): | |
Capybara::ElementNotFound: Unable to find field "Email or login" | |
/srv/gitorious/app/vendor/bundle/ruby/1.9.1/gems/capybara-2.1.0/lib/capybara/node/finders.rb:41:in `block in find' |
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
>>> Compiling ruby 2.1.0 ... | |
CC = gcc | |
LD = ld | |
LDSHARED = gcc -shared | |
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -ansi -std=iso9899:199409 | |
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE | |
CPPFLAGS = -I. -I.ext/include/x86_64-linux -I./include -I. | |
DLDFLAGS = -fstack-protector -pie | |
SOLIBS = | |
Using built-in specs. |
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
var Line = React.createClass({ | |
render: function() { | |
return <span className="line">{this.props.text}</span>; | |
} | |
}); | |
var Terminal = React.createClass({ | |
render: function() { | |
var lines = this.props.lines.map(function(line) { | |
return <Line text={line} />; # how to add a new-line character after this? |
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
type Process struct { | |
Monitor Monitor | |
} | |
func (p *Process) Kill(sig os.Signal) { | |
pid, err := p.Monitor.Pid() | |
if err != nil { | |
log.Println(err) | |
return | |
} |
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
$ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz | |
$ tar xzvf yaml-0.1.4.tar.gz | |
$ cd yaml-0.1.4 | |
$ ./configure --prefix=/usr/local | |
$ make | |
$ make install |
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
export GEM_PATH=/home/git/.gem/ruby/1.9.3:/usr/local/lib/ruby/gems/1.9.1 | |
export GEM_ROOT=/usr/local/lib/ruby/gems/1.9.1 | |
export GEM_HOME=/home/git/.gem/ruby/1.9.3 | |
export PATH=$PATH:/home/git/.gem/ruby/1.9.3/bin |
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 'sinatra' | |
# /a/b/:/d matches | |
# /a%2fb/:/d matches | |
# /a/b/%3a/d doesn't match | |
get '/a/b/:/d' do | |
'yay 1' | |
end | |
# /e/f/:/h matches |
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
~/scratch % vagrant up --provider=lxc | |
Bringing machine 'default' up with 'lxc' provider... | |
[default] Importing base box 'raring64'... | |
[default] Setting up mount entries for shared folders... | |
[default] -- /vagrant | |
[default] Starting container... | |
[default] Waiting for container to start. This should not take long. | |
[default] Container started and ready for use! | |
~/scratch % vagrant ssh | |
Welcome to Ubuntu 13.04 (GNU/Linux 3.8.0-25-generic x86_64) |