Skip to content

Instantly share code, notes, and snippets.

@potomak
potomak / jitsu_users_confirm.out
Created July 10, 2012 21:09
Nodejitsu account confirmation
giovanni@thinkpad:~$ jitsu users confirm potomak XXX
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command users confirm potomak XXX
info: Confirming user potomak
info: Great success! potomak is now confirmed.
info: User potomak confirmed
info: Would you like to log in now?
prompt: (yes/no): (yes)
info: Attempting to log in as potomak
gem 'rails-api'
gem 'active_model_serializers'
gem_group :development, :test do
gem 'debugger'
gem 'rspec-rails'
gem 'shoulda-matchers'
gem 'factory_girl_rails'
end
@potomak
potomak / notify_url_change.rb
Created October 11, 2013 12:12
Get a notification when the NodeKO registration opens.
require 'eventmachine'
require 'em-http-request'
EM.run {
timer = EM::PeriodicTimer.new(60) do
http = EM::HttpRequest.new('http://nodeknockout.com/teams/new').get
http.errback {
puts 'Uh oh'
}
@potomak
potomak / connected_actual.log
Created November 27, 2013 18:09
FB.getLoginStatus Chromium error
FB.getLoginStatus Object {authResponse: undefined, status: "unknown"}
FB.login Object {authResponse: Object, status: "connected"}
@potomak
potomak / gist:7941218
Created December 13, 2013 08:13
Suggested Ruby On Rails Learning Resources
[...]
npm info build /home/giovanni/.hoodie/cache/my-first-hoodie/node_modules/hoodie-server/node_modules/browserify/node_modules/module-deps
npm verb linkStuff [ false,
npm verb linkStuff false,
npm verb linkStuff false,
npm verb linkStuff '/home/giovanni/.hoodie/cache/my-first-hoodie/node_modules/hoodie-server/node_modules/browserify/node_modules' ]
npm info linkStuff module-deps@1.3.0
npm verb linkBins module-deps@1.3.0
npm verb link bins [ { 'module-deps': 'cmd.js' },
npm verb link bins '/home/giovanni/.hoodie/cache/my-first-hoodie/node_modules/hoodie-server/node_modules/browserify/node_modules/.bin',
@potomak
potomak / quiz.rb
Created April 28, 2014 21:54
Follow Rainforest
require 'net/http'
require 'json'
hash = { 'follow' => 'http://letsrevolutionizetesting.com/challenge?id=47526821' }
begin
uri = URI(hash['follow'])
req = Net::HTTP::Get.new(uri)
req['Accept'] = 'application/json'
@potomak
potomak / accounts.sql
Created April 30, 2014 18:30
Rainforest QA
-- accounts
-- ========
-- id
-- email
--
-- pricing_plans
-- ===========
-- id
-- price_in_cents
--
@potomak
potomak / warning.txt
Created May 2, 2014 15:03
Deprecation warning
DEPRECATION WARNING: It looks like you are eager loading table(s) (one of: contacts, additional_infos, groups, users) that are referenced in a string SQL snippet. For exa
mple:
Post.includes(:comments).where("comments.title = 'foo'")
Currently, Active Record recognizes the table in the string, and knows to JOIN the comments table to the query, rather than loading comments in a separate query. However,
doing this without writing a full-blown SQL parser is inherently flawed. Since we don't want to write an SQL parser, we are removing this functionality. From now on, you
must explicitly tell Active Record when you are referencing a table from a string:
Post.includes(:comments).where("comments.title = 'foo'").references(:comments)