Skip to content

Instantly share code, notes, and snippets.

[...]
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)
@potomak
potomak / style_guide.markdown
Created November 26, 2014 08:27
Addictive style guide

Javascript

  • Indent using 2 spaces
  • Use single quotes, unless you are writing JSON
  • Declare one variable per var statement
  • Variables and properties should use lower camel case capitalization
  • Class names should be capitalized using upper camel case
  • Constants should be declared as regular variables or static class properties, using all uppercase letters
  • Use the triple equality operator
@potomak
potomak / tmux-minimal-cheatsheet.markdown
Last active August 29, 2015 14:12
Minimal tmux cheatsheet

Minimal tmux cheatsheet

Command line

$ tmux                 # start tmux
$ tmux attach-session  # attach to an existing session

Attached client

Keybase proof

I hereby claim:

  • I am potomak on github.
  • I am potomak (https://keybase.io/potomak) on keybase.
  • I have a public key whose fingerprint is 76BE C683 116E 5F55 92B9 2E3A B490 F9B2 5250 F4C2

To claim this, I am signing this object:

@potomak
potomak / corridor.markdown
Last active August 29, 2015 14:16
Test story

{{#kitchen}} You remember you already saw the kitchen, but let's take a look at it again. {{/kitchen}}

{{^kitchen}} You never saw the kitchen, you're excited! {{/kitchen}}

Enter the kitchen.

@potomak
potomak / index.markdown
Created April 1, 2015 04:35
The forest
var friends = document.getElementById("friends").getElementsByTagName("a")
var clickEvent = document.createEvent("MouseEvents");
clickEvent.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
for(var i = 0; i < friends.length; i++) {friends[i].dispatchEvent(clickEvent);}