Skip to content

Instantly share code, notes, and snippets.

View hashrocketeer's full-sized avatar

Hashrocket Employees hashrocketeer

View GitHub Profile
@hashrocketeer
hashrocketeer / vimtutor.txt
Created October 17, 2018 01:01
vimtutor!
===============================================================================
= W e l c o m e t o t h e V I M T u t o r - Version 1.5 =
===============================================================================
Vim is a very powerful editor that has many commands, too many to
explain in a tutor such as this. This tutor is designed to describe
enough of the commands that you will be able to easily use Vim as
an all-purpose editor.
The approximate time required to complete the tutor is 25-30 minutes,
@hashrocketeer
hashrocketeer / keybase.md
Last active February 27, 2019 21:38
keybase.md

Keybase proof

I hereby claim:

  • I am hashrocketeer on github.
  • I am hashrocketeer (https://keybase.io/hashrocketeer) on keybase.
  • I have a public key ASBIb9XgMnMAmoQVTeVvD7_2JcyWtDq2x4Ldk8M1iOlwygo

To claim this, I am signing this object:

# Welcome to Sonic Pi v2.10
live_loop :kwiyor do
play chord_degree(ring(1,5,6,4).tick, :f3), sustain: 1, release: 0.5
sleep 2
end
live_loop :drumz do
sync :kwiyor
16.times do
# $ rails new <rails_app_name> -m base_app.rb -S -T -d postgresql
# Install gems
gem "haml-rails"
gem "decent_exposure"
gem_group :development do
gem "better_errors"
end
require 'method_source'
module ChristmasTree
class WrappingPaper
class ExpressionParser
attr_reader :block
ExpressionOptions = Struct.new(:expression, :line_number) do
def range
@hashrocketeer
hashrocketeer / auto_loaded_constant.rb
Created May 17, 2013 21:18
autoloading from a trap call raises ThreadError on ruby 2.0
module AutoloadBug
AutoLoadedConstant = 5
end
@hashrocketeer
hashrocketeer / workspace.sh
Created April 26, 2013 21:02
setup dotmatrix and some other goodies
#!/usr/bin/env bash
source ~/.rvm/scripts/rvm
rvm install 1.9.3
rvm use --default 1.9.3
cd $HOME
echo 'colorscheme railscasts' >> $HOME/.vimrc.local
@hashrocketeer
hashrocketeer / backtrace.rb
Created March 4, 2013 19:20
App backtraces, even when testing javascript.
ApplicationController.class_eval do
rescue_from StandardError do |exception|
$stderr.puts ExceptionFormatter.summarize exception
raise
end
end
class ExceptionFormatter
extend Cucumber::Term::ANSIColor
def self.summarize(e)
@hashrocketeer
hashrocketeer / hdb.rake
Created February 12, 2013 17:48
Clone task for heroku databases
# tasks for working with your heroku database
#
# Examples:
#
# Replace development DB with a fresh capture from Heroku
# (removing the oldest one first)
#
# rake hdb:clone # replace development database with a fresh capture of the
# heroku database
#
module TabularSupport
def hashes_from_table
actual = find("table")
headers = actual.all("th").map(&:text)
actual.all("tbody tr").map do |row|
Hash[headers.zip row.all("td").map(&:text).compact.map(&:strip)]
end
end
end