Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# executables prefix | |
_prefix="/usr/bin" | |
# git executable | |
_git="$_prefix/git" | |
# site generation executable | |
_generate="$_prefix/jekyll" | |
# options for the generator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Collectd: Blackbox", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "plugin:\"load\"", | |
"alias": "Load", | |
"color": "#7EB26D", | |
"id": 0, |
OlderNewer