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 -x | |
# | |
# http://www.xm5design.com/?p=103 | |
# | |
[[ -f /Library/StartupItems/Parallels/Parallels ]] && /Library/StartupItems/Parallels/Parallels stop | |
rm -rf /Library/Parallels | |
rm -rf /Library/Receipts/Parallels.pkg | |
# | |
rm -rf /Applications/Parallels.app | |
rm -rf /Applications/Parallels |
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 src="lib/jquery.js" type="text/javascript"></script> | |
<script src="jquery.validate.js" type="text/javascript"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function(){ | |
var options = { rules : {} } | |
var courses = $('input').filter(function(){ |
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
#define _GNU_SOURCE | |
#include <dirent.h> /* Defines DT_* constants */ | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <sys/syscall.h> |
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 'rubygems' | |
require 'directory_watcher' | |
dw = DirectoryWatcher.new '.' | |
dw.interval = 1.0 | |
dw.add_observer do |*args| | |
args.each do |event| | |
if /file\d/ =~ event.path |
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
color_index() { | |
# Show an index of all available bash colors | |
# Adapted from http://madebynathan.com/2011/08/16/bash-color-index/ | |
echo -e "\n Usage: \\\033[*;**(;**)m" | |
echo -e " Default: \\\033[0m\n" | |
# Top border | |
echo -e " \033[0;30;40m \033[0m" | |
for STYLE in 2 0 1 4 9; do | |
echo -en " \033[0;30;40m " | |
# Display black fg on white bg |
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
# http://stackoverflow.com/questions/748675/finding-duplicate-files-and-removing-them/748908#748908 | |
import sys | |
import os | |
import hashlib | |
def chunk_reader(fobj, chunk_size=1024): | |
"""Generator that reads a file in chunks of bytes""" | |
while True: | |
chunk = fobj.read(chunk_size) |
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 "time" | |
begin | |
Dir::mkdir("screenshots") | |
rescue | |
end | |
commit = File.new(".git/refs/heads/master", "r").read.strip |
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
worldclock() { | |
ADDIS_ABABA=`TZ=Africa/Addis_Ababa date +"%c (%z %Z)"` | |
BERLIN=`TZ=Europe/Berlin date +"%c (%z %Z)"` | |
CHICAGO=`TZ=America/Chicago date +"%c (%z %Z)"` | |
HONK_KONG=`TZ=Asia/Hong_Kong date +"%c (%z %Z)"` | |
LONDON=`TZ=Europe/London date +"%c (%z %Z)"` | |
LOS_ANGELES=`TZ=America/Los_Angeles date +"%c (%z %Z)"` | |
MOSCOW=`TZ=Europe/Moscow date +"%c (%z %Z)"` | |
NEW_YORK=`TZ=America/New_York date +"%c (%z %Z)"` | |
SOFIA=`TZ=Europe/Sofia date +"%c (%z %Z)"` |
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
k;double sin() | |
,cos();main(){float A= | |
0,B=0,i,j,z[1760];char b[ | |
1760];printf("\x1b[2J");for(;; | |
){memset(b,32,1760);memset(z,0,7040) | |
;for(j=0;6.28>j;j+=0.07)for(i=0;6.28 | |
>i;i+=0.02){float c=sin(i),d=cos(j),e= | |
sin(A),f=sin(j),g=cos(A),h=d+2,D=1/(c* | |
h*e+f*g+5),l=cos (i),m=cos(B),n=s\ | |
in(B),t=c*h*g-f* e;int x=40+30*D* |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
Example usage: python simpledump.py data/marc/010-lok.mrc | |
""" | |
import pymarc | |
import sys |