Skip to content

Instantly share code, notes, and snippets.

View lodestone's full-sized avatar
:octocat:
🤘Grokking Out 🤘

Matt Petty lodestone

:octocat:
🤘Grokking Out 🤘
View GitHub Profile
@jcasimir
jcasimir / Rakefile
Created July 20, 2011 17:34
Using Rake to keep track of my pending/to-do items while writing
FILE_SEARCH_PATTERN = "tutorials/**/*.{markdown, textile}"
MARKERS = {"todo" => :red, "pending" => :green}
COLORIZE = true
MARKERS.keys.each do |marker|
desc "Pull out #{marker.upcase} lines"
task marker do
print_lines_containing(marker)
end
end
@ariera
ariera / README.markdown
Created August 11, 2011 09:41
A keyboard shortcut to run tests with watchr

A keyboard shortcut to run tests with watchr

When developing in rails I use watchr to run the tests each time a file is saved, but lots of times I find my self adding a whitespace or a newline and saving just to trigger watchr and run the tests.

I wanted to have is a simple keyboard shortcut (like F15) to tell watchr to run the last spec, and mpartel (thx! : ) gave me an idea on how to do it, so here it is:

Dependencies

Obviously you need watchr, but we're also going to need pgrep that will help us find out the pid of the watchr process. So go ahead and do

sudo port install proctools

Hi David,
I came across your profile online and wanted to reach out about Development
Opportunities here at Groupon. The company is growing, and we're always
looking for folks with solid skills that can make positive contribution to
our continued success. Any chance you'd be open to a quick conversation
about opportunities, or for any possible networking potential? If so, let me
know when you're free and we can set up a time to chat. Also, if you are
interested, it would be great if you could forward a current resume over
that I can take a look at. I look forward to hearing back from you! Please
let me know if you have any questions.
@lodestone
lodestone / backgroundcolor.vim
Created December 18, 2011 16:52
Set a temporary session background color
" Set a temporary background color.
" I use this to differentiate
" visually between windows easily.
function! SetBackground(color)
let setbg=':highlight Normal guibg=' . a:color
exec setbg
endfunction
command! -nargs=? BackgroundColor :call SetBackground(<f-args>)
nmap <leader>bg :BackgroundColor #
@obra
obra / env.sample.js
Created December 30, 2011 19:49 — forked from jmreidy/env.sample.js
Pivotal to Sprintly importer
module.exports = {
pivotal: {
TOKEN: 'TOKEN'
PID: 'PID',
},
sprintly: {
USER: "USER_EMAIL",
ID: 'PRODUCT_ID',
KEY: 'API_KEY'
},
@lodestone
lodestone / cream_and_sugar.rb
Created January 30, 2012 20:33 — forked from joshuaclayton/cream_and_sugar.rb
Simple decorator pattern
require "money"
class Decorator < BasicObject
undef_method :==
def initialize(component)
@component = component
end
def method_missing(name, *args, &block)
@mbleigh
mbleigh / Gemfile
Created March 21, 2012 03:14
Non-Rails Rackup with Sprockets, Compass, Handlebars, Coffeescript, and Twitter Bootstrap
source "https://rubygems.org"
gem 'sprockets'
gem 'sprockets-sass'
gem 'sass'
gem 'compass'
gem 'bootstrap-sass'
gem 'handlebars_assets'
gem 'coffee-script'
@peterhellberg
peterhellberg / Gemfile
Created April 10, 2012 11:51
Sinatra acceptance testing, using minitest/spec and capybara-webkit
source :rubygems
gem "sinatra", "~> 1.3.2"
group :test do
gem "minitest", "~> 2.10"
gem "rack-test", "~> 0.6.1"
gem "capybara", "~> 1.1"
gem "capybara-webkit", "~> 0.11"
gem "capybara_minitest_spec", "~> 0.2"
@lodestone
lodestone / editscript.rb
Created July 7, 2012 22:47 — forked from ttscoff/editscript.rb
Fuzzy CLI file search through configured directories, ranked results displayed as menu
#!/usr/bin/env ruby
# encoding: utf-8
# == Synopsis
# Proof of concept using Fuzzy File Finder to locate a script to edit
# Searches a set of predefined locations for a fuzzy string
# e.g. "mwp" matches both "myweatherprogram" and "mowthelawnplease"
# ................on "(m)y(w)eather(p)rogram" and "(m)o(w)thelawn(p)lease"
#
# Results are ranked and a menu is displayed with the most likely
# match at the top. Editor to be launched and directories to search
@lodestone
lodestone / eoc.rb
Created August 27, 2012 19:25
Using `EOC` in ruby code scripts.
# Using <<`EOC` in the manner lets you run a longer script from within Ruby easily.
print <<`EOC`
echo "This one is for the bitches"
echo "This ones is too"
EOC