Skip to content

Instantly share code, notes, and snippets.

View DarrenN's full-sized avatar
🌵
(on-a vision-quest)

Darren DarrenN

🌵
(on-a vision-quest)
View GitHub Profile
<form action="https://launchpad.37signals.com/authenticate" method="post">
<input name="product" value="YOUR-PRODUCT" type="hidden" />
<input name="subdomain" value="YOUR-SUBDOMAIN" type="hidden" />
<p>Username<br />
<input name="username" id="username" type="text" /></p>
<p>Password<br />
<input name="password" id="password" type="password" /></p>
// ==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';
@wilmoore
wilmoore / SplClassLoader.php
Created June 5, 2010 04:25 — forked from jwage/SplClassLoader.php
PHP 5.3 Namespace Autoloader
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
class MyApplication < Sinatra::Base
use Rack::Session::Cookie
use Warden::Manager do |manager|
manager.default_strategies :password
manager.failure_app = MyApplication
end
Warden::Manager.serialize_into_session{ |user| user.id }
@cowboy
cowboy / textmate_grammar-html_syntaxhighlighter_pre_brush
Created October 7, 2010 17:55
TextMate + Zen Coding + SyntaxHighlighter + this = yay
{ 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'; },
<?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>
@ggilder
ggilder / TextMate_scriptmate_fix.rb
Created November 3, 2010 22:35
Fix TextMate's scriptmate.rb to work with Ruby 1.9
# 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
# using rvm with ruby-1.8.7-p249
# latest version 2.7.7 2010-06-17
brew install libxml2
# installing libxslt from source code
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
tar xvfz libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7
@seancribbs
seancribbs / test_server.coffee
Created January 7, 2011 18:00
WIP port of Ripple's Riak::TestServer to riak-js
$ 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
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}")