Skip to content

Instantly share code, notes, and snippets.

defunkt / gist:449668
Created Jun 23, 2010 — forked from dustin/gist:397971
Emacs Lisp to automatically add, commit, and push when files change
View gist:449668
;; Automatically add, commit, and push when files change.
(defvar autocommit-dir-set '()
"Set of directories for which there is a pending timer job")
(defun autocommit-schedule-commit (dn)
"Schedule an autocommit (and push) if one is not already scheduled for the given dir."
(if (null (member dn autocommit-dir-set))
View binary.html
<!-- -->
<script language="vbscript">
Function BinaryArrayToAscCSV( aBytes )
Dim j, sOutput
sOutput = "BinaryArrayToAscCSV"
For j = 1 to LenB(aBytes)
sOutput= sOutput & AscB( MidB(aBytes,j,1) )
View Cash_Register_1.rb
puts "What is the amount due?"
total = gets.chomp.to_f
puts "What is the amount tendered?"
paid = gets.chomp.to_f
if paid < total
puts "WARNING: Customer still owes $#{format("%.2f", total-paid)}"
elsif paid > total
View gist:cda3a6a1d039398f09ee
class JobSchedule
# External interface for calling the service
def, opts={})
if perform_asynchronously?
Delayed::Job.enqueue(, object_id, opts))
perform(object_id, opts)
View HistoryView--Add-a-method-to-put-a-commit-online.diff
From c6966ade4141e695159b3b38bdc60a7a82d30775 Mon Sep 17 00:00:00 2001
From: Pieter de Bie <>
Date: Thu, 25 Sep 2008 22:25:46 +0200
Subject: [PATCH] HistoryView: Add a method to put a commit online
GitX.xcodeproj/project.pbxproj | 4 +++
Images/spinner.gif | Bin 0 -> 1924 bytes
PBGitCommit.h | 2 +
PBGitCommit.m | 9 +++++++
View log2icalendar.rb
#!/usr/bin/env ruby
# Git log to iCalendar
# Written by Dmitry Chestnykh, 5 Aug 2008
# Public domain
# Usage:
# cd git-repo
View gist:29879
# Remove any duplicate tracks in iTunes
# PJ Hyett was here 11/2008
framework "Cocoa"
framework "ScriptingBridge"
itunes = SBApplication.applicationWithBundleIdentifier("")
View fstring.hpp
/** Fast String - Voice Technology
* Simple char[] substitute with faster appender.
* Fernando Gregianin Testa <>
* v0.1 - Usando no provider v2. 2007-02-22
#ifndef FSTRING_
#define FSTRING_
#include <stdlib.h>
View MacRuby way
person = = name
person.setFirstName(first, lastName:last)

Hi, my name is ByunTae from South Korea. I have been playing Starcraft since 1998 and I was born and raised in Korea. I'm 100% full blooded Korean, meaning I have been gifted with unparallel talent to master any video game, particularly, Starcraft: Brood War. I'm also experienced in Counter-Strike, I am able to perform bunny hops, my best score on a public 32 player game was 171-2 with 170 kill streak. I'm offering my expertise in Starcraft to be taught to non-Koreans that wishes to have the skill of a Korean player. I have advised and coached many professional gamers such as Im Jae Dong, Park Myung Soo, Ma Jae Yoon, and more. Boxer and I were great friends until he started using my dropships to gain his fame. I started training other players to be on par with Boxer and eventually surpassing Boxer. He is no longer the best player thanks to my contribution to rest of the players. I did not compete in pro gaming because they KTF did not agree with my seven figure contract demand.

Things I will be teaching in