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
This is gist. | |
There are many like it, but this one is mine. | |
It is my life. | |
I must master it as I must master my life. | |
Without me gist is useless. | |
Without gist, I am useless. |
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
.,mlkmlkml |
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
#!/bin/sh | |
git stash | |
git symbolic-ref HEAD refs/heads/$1 | |
rm .git/index | |
git clean -f -d | |
# (via johnw) | |
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
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 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 ruby | |
require "tempfile" | |
GIST_URL = 'http://gist.github.com/gists' | |
if ARGV.include? "-p" | |
text = `pbpaste` | |
elsif !ARGV.empty? | |
@filename = ARGV.shift | |
text = File.read(File.expand_path(@filename)) |
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
;; Issac Trotts' demonstration of pattern matching in Nu | |
(function people-to-string (people) | |
(match people | |
(() "no people") | |
((p1) "one person: #{p1}") | |
((p1 p2) "two people: #{p1} and #{p2}") | |
(else "too many people: #{(people length)}"))) | |
(assert_equal "no people" |
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
From 1feae123089ec8c205c805edbe58f63f4c3cfe14 Mon Sep 17 00:00:00 2001 | |
From: Scott Chacon <[email protected]> | |
Date: Wed, 6 Aug 2008 12:35:34 -0700 | |
Subject: [PATCH] updated grit to use the working directory for status | |
--- | |
vendor/gems/grit/lib/grit/repo.rb | 2 ++ | |
vendor/gems/grit/lib/grit/status.rb | 32 +++++++++++++++++--------------- | |
2 files changed, 19 insertions(+), 15 deletions(-) | |
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 'net/http' | |
require 'uri' | |
# /api/v1/:format/new | |
# /api/v1/:format/gists/:user | |
# /api/v1/:format/:gist_id | |
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'), | |
{ 'files[file1.ab]' => 'CONTNETS', | |
'files[file2.ab]' => '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
test gist |
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
test gist |
OlderNewer