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
task :server do | |
fork do | |
exec 'bundle exec rackup -p 4567' | |
end | |
exec %{rerun -p "{Rules,Gemfile,content/**/*,lib/**/*,static/**/*,layouts/**/*}" -x nanoc compile} | |
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
# a method presently in the model | |
# I rapidely used slice to mimic attr_accessible and to have tests pass | |
# but I am wondering if such code shouldn't go in the controller instead | |
class Taxonomy < ActiveRecord::Base | |
has_many :terms, | |
-> {order(:id)} | |
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
choices: ['yes', 'no'] | |
label: 'auth.labels.automaticLogin' | |
tabindex: idx++ | |
produces: | |
{ | |
choices: ['yes', 'no'] | |
}, { | |
label: 'auth.labels.automaticLogin', |
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
hash = {} | |
a.resource_sets.each do |set| | |
r = set.resource | |
hash[set.key] = { | |
:id => r.id, | |
:url => r.url | |
} | |
end | |
hash |
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
client | |
proto udp | |
dev tun | |
ca ca.crt | |
dh dh2048.pem | |
cert kuon.crt | |
key kuon.key | |
remote <hidden remote ip> 1191 | |
cipher DES-CBC | |
verb 2 |
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
explain analyse SELECT "field_values".* FROM "field_values" LEFT OUTER JOIN "field_entry_values" ON "field_entry_values"."field_value_id" = "field_values"."id" LEFT OUTER JOIN "field_entries" ON "field_entries"."id" = "field_entry_values"."field_entry_id" WHERE "field_entries"."id" IS NULL; | |
QUERY PLAN | |
---------------------------------------------------------------------------------------------------------------------------------- | |
Hash Anti Join (cost=366.83..613.78 rows=1 width=146) (actual time=69.079..69.079 rows=0 loops=1) | |
Hash Cond: (field_entry_values.field_entry_id = field_entries.id) | |
-> Hash Right Join (cost=129.64..350.77 rows=9391 width=162) (actual time=12.138..41.534 rows=9406 loops=1) | |
Hash Cond: (field_entry_values.field_value_id = field_values.id) | |
-> Seq Scan on field_entry_values (cost=0.00..174.17 rows=9391 width=32) (actual time=0.007..8.561 rows |
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
memoways=# \d field_entries | |
Table "public.field_entries" | |
Column | Type | Modifiers | |
---------------------+-----------------------------+------------------------------------- | |
id | uuid | not null default uuid_generate_v4() | |
created_at | timestamp without time zone | not null | |
updated_at | timestamp without time zone | not null | |
field_definition_id | uuid | not null | |
asset_id | uuid | | |
Indexes: |
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
resources :users do | |
put 'parents/:parent_id', :action => 'add_parent', :as => 'parents' | |
delete 'parents/:parent_id', :action => 'remove_parent' | |
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
┌─(~/Projects/GithubForks/cappuccino/Foundation)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(2012-07-11 17:13:19)─(kuon@aiur)─ | |
└─(node *)─> touch CPArray/* | |
┌─(~/Projects/GithubForks/cappuccino/Foundation)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(2012-07-11 17:13:30)─(kuon@aiur)─ | |
└─(node )─> time jake | |
[CPP] _CPJavaScriptArray.j | |
[OBJJC] _CPJavaScriptArray.j | |
[CPP] CPArray.j | |
[OBJJC] CPArray.j | |
[CPP] CPMutableArray.j | |
[OBJJC] CPMutableArray.j |
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
create table nodes (int id, int parent_id); | |
insert into nodes (1, null); | |
insert into nodes (2, null); | |
insert into nodes (3, 1); | |
insert into nodes (4, 2); | |
insert into nodes (5, 4); | |
How can I do a query like this (on PostgreSQL 9.1): |