Skip to content

Instantly share code, notes, and snippets.

View hashrocketeer's full-sized avatar

Hashrocket Employees hashrocketeer

View GitHub Profile
@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:

@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,
# 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
class PathFinder
attr_reader :paths
def initialize(paths)
@paths = paths
end
def find(request_path)
find_path(request_path) or fail ActiveRecord::RecordNotFound
end
# credit @rwz
When /^I follow "([^"]+"(?: then "[^"]+")*)$/ do |links|
links.chomp(?").split('" then "').each do |link_text|
click_link link_text
end
end
# Example usage:
# When I follow "thing1" then "thing2" then "thing3"
// Generated by CoffeeScript 1.6.3
var constraint, material, mesh, wheel_geometry;
material = Physijs.createMaterial(new THREE.MeshLambertMaterial({
map: THREE.ImageUtils.loadTexture('images/checker.gif')
}), .8, .5);
wheel_geometry = new THREE.CylinderGeometry(5, 5, 2, 16);
mesh = new Physijs.CylinderMesh(wheel_geometry, material, 16);
# $ 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