First, lets try to understand what the rake setup
does, it creates
a basic linux system under /tmp/warden directory using 2 basic tools:
debootstrap and chroot. Deboostrap is a tool that setup a basic debian OS,
ubuntu is based on debian so that's the reason why we can use debootstrap to create
ubuntu systems too, basically you run: debootstrap [OPTION...] SUITE TARGET [MIRROR [SCRIPT]]
see (man deboostrap). After the installation you can use that system with chroot command
to run commands or interactive shell with a special root directory (see man chroot).
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(main):004:0> x = RubyVM::InstructionSequence.new('puts "hello #{foo}"') | |
=> <RubyVM::InstructionSequence:<compiled>@<compiled>> | |
irb(main):005:0> puts x.disasm | |
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>========== | |
0000 trace 1 ( 1) | |
0002 putself | |
0003 putobject "hello " | |
0005 putself | |
0006 opt_send_simple <callinfo!mid:foo, argc:0, FCALL|VCALL|ARGS_SKIP> | |
0008 tostring |
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
Copyright (c) 2013 Couller Ltd. and Joseph Ray | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
Введение
Начать стоит отсюда. Не пугайтесь то, что это книга по незнакомой OS, эти термины практически везде одинаковые и здесь они изложены в понятной для начинающих форме.
http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html
Прочесть нужно треть главы до подраздела "Starting a process", если С не пугает, читайте полностью. После прочтения вы будете понимать, что такое process, thread, mutex, priorites, semaphores, scheduler, contex-switch, kernel states.
Ruby
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
Django==1.3 | |
Flask==0.9 | |
graphite-web | |
carbon==0.9.10 | |
whisper | |
uwsgi | |
simplejson | |
django-tagging |
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
# Makefile for a go project | |
# | |
# Author: Jon Eisen | |
# site: joneisen.me | |
# | |
# Targets: | |
# all: Builds the code | |
# build: Builds the code | |
# fmt: Formats the source files | |
# clean: cleans the code |
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
set :shared_children, shared_children << 'tmp/sockets' | |
namespace :deploy do | |
desc "Start the application" | |
task :start, :roles => :app, :except => { :no_release => true } do | |
run "cd #{current_path} && RAILS_ENV=#{stage} bundle exec puma -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock' >> #{shared_path}/log/puma-#{stage}.log 2>&1 &", :pty => false | |
end | |
desc "Stop the application" | |
task :stop, :roles => :app, :except => { :no_release => true } do |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
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
def select_from_chosen(item_text, options) | |
field = find_field(options[:from]) | |
option_value = page.evaluate_script("$(\"##{field[:id]} option:contains('#{item_text}')\").val()") | |
page.execute_script("$('##{field[:id]}').val('#{option_value}')") | |
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
http://devcenter.heroku.com/articles/quickstart | |
http://martinciu.com/2011/11/deploying-hubot-to-heroku-like-a-boss.html | |
1. install RVM: https://rvm.beginrescueend.com/ | |
2. install Ruby: rvm install 1.9.2 && rvm use 1.9.2 --default | |
3. install Heroku: sudo gem install heroku | |
4. install Homebrew: https://github.com/mxcl/homebrew/wiki/Installation |