- Mini state machines for page state with sass/jquery and
html
orbody
classes. - double-layer color constants: layer one: color names ($olive-green), layer two: common uses of colors ($link-color).
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
# install a phar file from a remote server directly | |
define php::phar ($url, $insecure = false, $target = $title) { | |
$split = split($url, '/') | |
$filename = $split[-1] | |
# for wget bug workarounds | |
if ($insecure == true) { | |
$wget_options = "--no-check-certificate" | |
} |
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
define php::conf { | |
if $::lsbdistcodename == 'precise' { | |
$php_build = '20090626' | |
file { "/etc/php5/conf.d/${title}.ini": | |
ensure => present, | |
owner => 'root', | |
group => 'root', | |
mode => '0644', | |
content => template("php/conf.d/${title}.ini"), |
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
// ==UserScript== | |
// @name Export Github Issues | |
// @namespace http://userscripts.org/users/tim | |
// @description Can export issues by state and label | |
// @include http://github.com/*/issues* | |
// ==/UserScript== | |
(function() { | |
var GITHUB_API_URL, GithubRequest, URL_EXPRESSION, formatOutput, menuCallback, repo, url, user; | |
URL_EXPRESSION = /^.*\/(.*?)\/(.*?)\/issues.*$/; | |
GITHUB_API_URL = 'http://github.com/api/v2/json'; |
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
{ name = 'source.css.embedded.html.syntaxhighlighter'; | |
begin = '(?:^\s+)?(<)((?i:pre))\b(?=[^>]*class=([''"])[^>]*?\bbrush\s*:\s*css\b[^>]*?\3)(?![^>]*/>)'; | |
end = '(?<=</(pre|PRE))(>)(?:\s*\n)?'; | |
beginCaptures = { | |
1 = { name = 'punctuation.definition.tag.html'; }; | |
2 = { name = 'entity.name.tag.style.html'; }; | |
}; | |
endCaptures = { 2 = { name = 'punctuation.definition.tag.html'; }; }; | |
patterns = ( | |
{ include = '#tag-stuff'; }, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>beforeRunningCommand</key> | |
<string>nop</string> | |
<key>bundleUUID</key> | |
<string>A9237092-D694-450A-8C8F-F9005D932664</string> | |
<key>command</key> | |
<string>osascript -e 'tell application "Safari" to set theSource to do JavaScript "window.document.documentElement.outerHTML" in document 1'</string> |
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
# located at /Applications/TextMate.app/Contents/SharedSupport/Support/lib/scriptmate.rb | |
# change lines 12 - 13: | |
$KCODE = 'u' if (RUBY_VERSION.to_f < 1.9) | |
require "jcode" unless "".respond_to? :each_char | |
# rest of the file is unchanged |
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
$ node ts.js | |
10 Jan 15:01:23 - prepared | |
10 Jan 15:01:24 - started | |
PUT /riak/airlines/KLM | |
10 Jan 15:01:24 - saved | |
10 Jan 15:01:24 - cleared | |
GET /riak/airlines/KLM | |
10 Jan 15:01:24 - not found! it works |
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 'coffee-script' | |
desc "compile coffee-scripts from ./src to ./public/views" | |
task :coffee do | |
source = "#{File.dirname(__FILE__)}/src/" | |
javascripts = "#{File.dirname(__FILE__)}/public/javascripts/" | |
Dir.foreach(source) do |cf| | |
unless cf == '.' || cf == '..' | |
js = CoffeeScript.compile File.read("#{source}#{cf}") |
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
def add_method(obj, mod, &blk) | |
obj.class_eval { define_method(mod, &blk) } | |
end | |
add_method(String, :greet) { "Hello, #{self}" } | |
"world".greet #=> "Hello, world!" |
OlderNewer