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/ruby | |
# http://gist.github.com/230533 | |
# forked from http://gist.github.com/124242 | |
# TODO: add iteration over arguments | |
filename=ARGV[0] | |
abort "Usage: flac2mp3 FLACFILE" if filename.nil? | |
`metaflac --export-tags-to=- "#{filename}"`.each_line do |s| | |
v=s.strip.split '=', 2 |
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 __future__ import with_statement | |
''' CHM File decoding support ''' | |
__license__ = 'GPL v3' | |
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>,' \ | |
' and Alex Bramley <a.bramley at gmail.com>.' | |
import sys, os, re, shutil | |
from tempfile import mkdtemp | |
from mimetypes import guess_type as guess_mimetype | |
from htmlentitydefs import name2codepoint |
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
/* A Trivial LLVM LISP | |
* Copyright (C) 2008-2009 David Robillard <[email protected]> | |
* | |
* Parts from the Kaleidoscope tutorial <http://llvm.org/docs/tutorial/> | |
* by Chris Lattner and Erick Tryzelaar | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
function draw() { | |
var canvas = document.getElementById("canvas"); | |
var ctx = canvas.getContext("2d"); | |
ctx.fillStyle = "black"; | |
ctx.beginPath(); |
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
[github] | |
token = !security 2>&1 >/dev/null find-generic-password -gs "github.token" | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/' |
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
function p12topem { | |
# Convert a p12 certificate export to raw OpenSSL pem format, including | |
# private key and certificate. | |
# via http://www.gridsite.org/wiki/Convert_p12 | |
openssl pkcs12 -in "$1" -nodes -out "$2" | |
# Make it readable only by you: | |
chmod 0400 "$2" | |
} |
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
# Initialize or renew Kerberos tickets. Assumes password for the requested principal is stored in the | |
# keychain, which is now automatically used by Snow Leopard kinit. | |
# This is useful to define globally in your shell profile, for easy use within other scripts and | |
# from the command-line. | |
function ker { | |
kinit -R 2> /dev/null | |
if [[ $? = '0' ]]; then | |
echo "renewed..." | |
klist | |
else |
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 the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
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/bash | |
# | |
# gitwait - watch file and git commit all changes as they happen | |
# via http://stackoverflow.com/questions/420143/making-git-auto-commit/965274#965274 | |
# | |
while true; do | |
inotifywait -qq -e CLOSE_WRITE ~/.calendar/calendar |
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
#include <CoreServices/CoreServices.h> | |
static void callback(ConstFSEventStreamRef streamRef, | |
void *clientCallBackInfo, | |
size_t numEvents, | |
void *eventPaths, | |
const FSEventStreamEventFlags eventFlags[], | |
const FSEventStreamEventId eventIds[]) { | |
exit(0); | |
} |