Skip to content

Instantly share code, notes, and snippets.

View gist:e456d5edc902ce3c0784b0b3657c0106
### Keybase proof
I hereby claim:
* I am datise on github.
* I am datise ( on keybase.
* I have a public key ASCzN6rQEnKRCfrYKtfDzRXdz3kXQCcZQHGg9ZA5nnbp3Qo
To claim this, I am signing this object:
Datise / 0.js
Last active Aug 29, 2015 — forked from mayfer/0.js
View 0.js
// run this with "node 0.js"
console.log("Hello World");
View bookstore.sql
FROM editions JOIN publishers ON (editions.publisher_id =
WHERE'Random House'
SELECT isbn, book_id
FROM editions JOIN publishers ON (editions.publisher_id =
JOIN books ON editions.book_id =
WHERE'Random House'
SELECT editions.isbn, editions.book_id, stock.stock, stock.retail
View input_output.rb
require 'rubygems'
require 'rest-client'
require 'open-uri'
DIRNAME = "vagrant"
hash = Dir.glob('../../vagrant/*/**').inject({}) do |hash, fname|
ext = File.basename(fname).split('.')[-1].to_s.downcase
hash[ext] ||= [ 0,0]
hash[ext][0] += 1
hash[ext][1] += File.size(fname)