Skip to content

Instantly share code, notes, and snippets.

View ryanjm's full-sized avatar

Ryan Mathews ryanjm

View GitHub Profile
Then /^the selected date for "([^"]*)" should be "([^"]*)"$/ do |field, date|
field = field.tr('[', '_')
field = field.tr(']', '_')
year_field = field + '1i'
month_field = field + '2i'
day_field = field + '3i'
date = Date.parse(date)
field_with_id(year_field).element.search(".//option[@selected = 'selected']").inner_html.should =~ /#{date.year}/
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@wolfeidau
wolfeidau / sass_converter.rb
Created May 7, 2011 02:43
Sass plugin for Jekyll
module Jekyll
# Sass plugin to convert .scss to .css
#
# Note: This is configured to use the new css like syntax available in sass.
require 'sass'
class SassConverter < Converter
safe true
priority :low
def matches(ext)
@c00kiemon5ter
c00kiemon5ter / post-commit
Created June 1, 2011 16:17
a hook to deploy static generated sites
#!/usr/bin/env bash
# executables prefix
_prefix="/usr/bin"
# git executable
_git="$_prefix/git"
# site generation executable
_generate="$_prefix/jekyll"
# options for the generator
@dhh
dhh / gist:1014971
Created June 8, 2011 18:09
Use concerns to keep your models manageable
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
#{config.root}/app/controllers/concerns
#{config.root}/app/models/concerns
)
end
end
@casademora
casademora / gist:1067256
Created July 6, 2011 13:47
Regenerate Core Data files in an Xcode project
## Add this as a 'Run Script' step in your Xcode Project prior to the compile step
mogen=`which mogenerator`
if [[ -x $mogen ]]; then
echo "Updating data objects using $mogen"
cd "$PROJECT_DIR/Model" && $mogen -m MyProject.xcdatamodeld/MyProject.xcdatamodel -M ./generated -H ./entities
fi
@wagenet
wagenet / Assetfile.rb
Created January 13, 2012 20:37
Ember Handlebars Precompile
require 'execjs'
class HandlebarsFilter < Filter
class << self
def contents
@@contents ||= [File.read("headless-ember.js"), File.read("ember.js")].join("\n")
end
def context
@@context ||= ExecJS.compile(contents)
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@untergeek
untergeek / kibana.json
Last active March 27, 2019 01:09
Simple Kibana dashboard for collectd stats
{
"title": "Collectd: Blackbox",
"services": {
"query": {
"list": {
"0": {
"query": "plugin:\"load\"",
"alias": "Load",
"color": "#7EB26D",
"id": 0,