Key | Description |
---|---|
C-s | Super key (Ctrl-x) |
M-w | Meta key (Alt-w) |
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
{ | |
"app/models/*.rb": { | |
"command": "model", | |
"affinity": "model", | |
"alternate": ["unit/models/%s_spec.rb", "spec/models/%s_spec.rb"], | |
"related": "db/schema.rb#%p", | |
"template": "class %S\nend" | |
}, | |
"spec/factories/*_factory.rb": { |
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
# sudo ln -s ~/nginx.conf unicorn.conf | |
upstream app_server { | |
server unix:/tmp/unicorn_padrino.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
charset utf-8; | |
server_name db.innshine.com; |
Введение
Начать стоит отсюда. Не пугайтесь то, что это книга по незнакомой 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
def pick(provider, current_proxy=nil) | |
_accessible = {"unaccessible" => nil} | |
_not_banned = [] | |
_not_banned << {"banned.#{provider}" => nil } | |
_not_banned << {"banned.#{provider}" => { '$lt' => BANNED_UNTIL[BANNED_SECONDS] }} | |
_different_subnet = {} | |
if current_proxy | |
_different_subnet = { |
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 app | |
spec_file = caller.grep(/_spec\.rb/).first | |
case spec_file | |
when /admin/ | |
Admin | |
when /app/ | |
Wordstat | |
else | |
raise "Unknown application!" |
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
%h2 | |
Your seat reservations | |
%span{:"data-bind" => "text: seats().length"} | |
%table | |
%thead | |
%tr | |
%th Passenger name | |
%th Meal | |
%th Surcharge |
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
<p>First name: <strong data-bind="text: firstName">Bert</strong></p> | |
<p>Last name: <strong data-bind="text: lastName">Bertington</strong></p> | |
<p>First name: <input data-bind="value: firstName" /></p> | |
<p>Last name: <input data-bind="value: lastName" /></p> | |
<p>Full name: <strong data-bind="text: fullName"></strong></p> | |
<button data-bind="click: capitalizeLastName">Go caps</button> |
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 ApplicationController < ActionController::Base | |
before_filter :require_authentication | |
private | |
def require_authentication | |
unless current_certificate.verify(public_key) | |
head :forbidden | |
end | |
end |
FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)
NewerOlder