This file contains hidden or 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
gem install vagrant | |
vagrant box add base http://files.vagrantup.com/lucid32.box | |
mkdir my_first_project | |
cd my_first_project | |
vagrant init | |
vagrant up | |
vagrant ssh |
This file contains hidden or 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
i'll try here... standby... | |
##header | |
-one | |
-two |
This file contains hidden or 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_development=# select * from things; | |
id | tags | |
----+--------------- | |
1 | {blue,yellow} | |
1 | {blue,red} | |
1 | {yellow,red} | |
1 | {blue} | |
(4 rows) | |
app_development=# select * from things where tags <@ '{"blue"}'; |
This file contains hidden or 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 things ( | |
id integer NOT NULL, | |
my_column varchar | |
); | |
insert into things (id) values (1); | |
insert into things (id) values (2); |
This file contains hidden or 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
# inside rails console | |
include ActionController::Caching::Fragments | |
fragment_cache_key [User.first, "hello", :monkey, false] | |
# => "views/users/1-20140404193333893414000/hello/monkey/false" |
This file contains hidden or 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
ActiveRecord::SessionStore::Session.find_each do |session| | |
if (user_to_find.id == session.data["warden.user.user.key"][0][0] rescue false) | |
print "[#{session.id}]" | |
end | |
end |
This file contains hidden or 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 a | |
raise "i am in a" | |
end | |
def b | |
puts "i am in b" | |
a | |
end | |
def c |
This file contains hidden or 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 href="javascript:Intercom('show')"> | |
Contact Support | |
</a> |
I hereby claim:
- I am jjb on github.
- I am johnjosephbachir (https://keybase.io/johnjosephbachir) on keybase.
- I have a public key whose fingerprint is C0BC 5EAB 0143 0A0C 1EF7 A2F8 C0A4 21F5 E525 9F60
To claim this, I am signing this object: