This file contains hidden or 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
01:21 <schacon> well like, lets say you use Emacs, and someone | |
posts an extension on gists, like this: http://gist.github.com/290 | |
01:22 <schacon> you use it and think it's cool, but add some | |
features, so you can fork it, make your change and even email | |
the original author, who can add you as a remote and merge your | |
change in, or several peoples changes and push back | |
01:23 <schacon> you have a list of all the gists you've ever made, | |
and can always go back and edit or update them: http://gist.github.com/mine | |
01:24 <schacon> if you have a multi-file project, like a little | |
sinatra app that maybe doesn't warrant it's own github project, |
This file contains hidden or 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
class String | |
# ANSI-colored version of the string | |
def colorize(color) | |
n = case color | |
when :black: 30 | |
when :red: 31 | |
when :green: 32 | |
when :yellow: 33 | |
when :blue: 34 | |
when :magenta: 35 |
This file contains hidden or 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
RemoteHgRepository = 'http://code.suckless.org/hg/dwm' | |
RemoteGitRepository = '[email protected]:sr/dwm.git' | |
__DIR__ = File.dirname(__FILE__) | |
Repository = __DIR__ + '/dwm' | |
GitRepository = __DIR__ + '/dwm-git' | |
StateFile = __DIR__ + '/hg-to-git-state' | |
ImportScript = __DIR__ + '/hg-to-git.py' | |
task :default => :mirror |
This file contains hidden or 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
function is-git? { | |
git status &> /dev/null | |
[ $? != 128 ] | |
} | |
function git-init-remote { | |
name=$(basename $PWD).git | |
path=~/repositories/$name | |
if is-git?; then | |
ssh bearnaise.net -t "mkdir $path && cd $path && git --bare init" || |
This file contains hidden or 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 File.dirname(__FILE__) + '/code/git-wiki/vendor/sinatra/lib/sinatra' | |
class Foo < Exception; | |
error RuntimeError do | |
"hey!" | |
end | |
error Foo do | |
"fooooo" |
This file contains hidden or 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
CmdUtils.CreateCommand({ | |
name: "bitly", | |
takes: {"url to shorten": noun_arb_text}, | |
preview: "Replaces the selected URL with a bit.ly-shortened URL.", | |
description: "Replaces the selected URL with a bit.ly-shortened URL.", | |
icon: "http://bit.ly/favicon.png", | |
execute: function( urlToShorten ) { | |
var baseUrl = "http://bit.ly/api"; | |
var params = {url: urlToShorten.text}; | |
jQuery.get(baseUrl, params, function(shortenedUrl) { |
This file contains hidden or 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
$rest = RestClient.new('http://foo.org') | |
get '/' do | |
$rest.put '/foo' | |
'hey' | |
end |
This file contains hidden or 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
all: rdf html | |
rdf: card.n3 | |
cwm.py card.n3 --rdf > card.rdf | |
html: head.html foot.html card.n3 foaf2html.n3 | |
cat head.html > index.html | |
cwm.py card.n3 foaf2html.n3 --think --strings >> index.html | |
cat foot.html >> index.html | |
clean: | |
rm -f card.rdf | |
rm -f index.html |
This file contains hidden or 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
CmdUtils.CreateCommand( | |
{ | |
name: "ruby", | |
takes: {"function": noun_arb_text}, | |
icon: "http://ruby-doc.org/favicon.ico", | |
homepage: "http://jackndempsey.blogspot.com", | |
author: {name: "Jack Dempsey", email: "[email protected]"}, | |
license: "MPL,GPL", | |
description: "Search ruby functions documentation", | |
help: "Select a ruby function", |
This file contains hidden or 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 'rubygems' | |
require 'json' | |
require 'rest_client' | |
$:.unshift File.dirname(__FILE__) + '/couch_rest' | |
module CouchRest | |
autoload :Server, 'server' | |
autoload :Database, 'database' | |
autoload :Pager, 'pager' |
OlderNewer