Skip to content

Instantly share code, notes, and snippets.

View jsteiner's full-sized avatar

Josh Steiner jsteiner

View GitHub Profile
@jsteiner
jsteiner / projections.json
Last active November 17, 2017 22:17
Example Rails.vim projections for an Ember.js project.
{
"app/assets/javascripts/models/*.coffee": {
"command": "jmodel",
"alternate": "spec/javascripts/models/%s_spec.coffee",
"template": "App.%S = DS.Model.extend"
},
"app/assets/javascripts/controllers/*_controller.coffee": {
"command": "jcontroller",
"alternate": "spec/javascripts/controllers/%s_spec.coffee",
@jsteiner
jsteiner / projections.json
Last active June 14, 2016 17:38
Example Rails.vim projections for a Backbone.js project.
{
"app/assets/javascripts/models/*.coffee": {
"command": "jmodel",
"alternate": "spec/javascripts/models/%s_spec.coffee",
"template": "class @AppName.Models.%S extends Backbone.Model"
},
"app/assets/javascripts/collections/*.coffee": {
"command": "jcollection",
@jsteiner
jsteiner / guest_manages_favorites_spec.rb
Created April 22, 2013 14:27
Example of page objects
require 'spec_helper'
feature 'Guest manages favorites', :js do
scenario 'can interact with the list of favorites' do
property = create(:property, :boston)
alternate_property = create(:property, :boston)
make_all_properties_available
search do
find ~ -name '*.log' -print0 | xargs -0 -L1 stat -f'%z %N' | sort -rn | tee fat-logfiles.txt | head
awk '{ total += $1 } END { printf "total: %5.2f MiB\n", total/1024/1024 }' < fat-logfiles.txt
@jsteiner
jsteiner / gist:2957762
Created June 20, 2012 02:12 — forked from croaky/gist:2957583
Getting a production dump from Heroku backups
curl -o latest.dump `heroku pgbackups:url --app project-production`
pg_restore --verbose --clean --no-acl --no-owner -d project_development latest.dump
rm latest.dump