View Deploying Sharetribe to

Deploying to Heroku

  1. Deploy the app to heroku following heroku normal instructions (add link to heroku help)

  2. Set heroku environment variables

    Make sure all the options in config.yml are properly set then run:

     bundle exec rake heroku:config
View hn_seach.js
function query() {
// HN is done with very unsemantic classes.
job_list ='.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list =,
shown = 0, total = job_list.length;
// Traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.classList.contains(klass)) {
View fixtures.rake
#put in lib/tasks/fixtures.rake
namespace :db do
namespace :fixtures do
desc 'Create YAML test fixtures from data in an existing database.
Defaults to development database. Set RAILS_ENV to override.'
task :dump => :environment do
sql = "SELECT * FROM %s"
skip_tables = ["schema_migrations"]
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name|
curl --cookie-jar cookie_file $LOGIN_PAGE | grep csrf-token
<meta content="csrf-token" name="csrf-token" />
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
View gist:f14ad6545e24d25eec02
require 'google_drive'
client = 'Google Drive Ruby test', application_version: '0.0.1')
key = Google::APIClient::KeyUtils.load_from_pkcs12(
'path to your p12 key file (all the path with file name)',
'your secret here given at download file it seems to be always the same: notasecret')
asserter =
'service account - email address - here',