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
#!/usr/bin/env ruby -w | |
# Converts images inside keynote bundles to PNG | |
# We need RMagick with tiff support installed | |
# You may get libtiff from macports | |
# and RMagick from rubygems | |
# Licensed under GPLv3 | |
require 'rubygems' |
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
#!/usr/bin/perl -w | |
# ./cheader.pl foo.h bar.c qux.py | |
# creates empty source files | |
use strict; | |
sub cheader { | |
my $guard = uc shift; | |
$guard =~ tr/\.\/-/_/; |
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
/* ./wtab n | |
* creates a truth table for LaTeX with n bits | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define SIZE unsigned long | |
#define MAXBITS sizeof(SIZE)*8-1 |
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
#!/usr/bin/env python | |
from sys import argv | |
print(sum(int(x) for x in argv[1])) |
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
source ~/.profile | |
autoload zmv | |
autoload -U compinit | |
compinit | |
zstyle ':completion:*:descriptions' format '%U%B%d%b%u' | |
zstyle ':completion:*:warnings' format '%BNichts gefunden fuer: %d%b' | |
zstyle ':completion:*' completer _complete _match _approximate | |
zstyle ':completion:*:match:*' original only |
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
/* Safari History.plist cleaner | |
* compile with: | |
* gcc historyclean.m -o historyclean | |
*/ | |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) { | |
if (argc != 3) { | |
fprintf(stderr, |
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
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use File::stat; | |
use File::Basename; | |
if (@ARGV == 0) { | |
print {*STDERR} "Usage: $0 infile outfile\n"; | |
print {*STDERR} "Usage: $0 indir outdir\n"; |
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
#include <stdio.h> | |
#include <string.h> | |
#include <dirent.h> | |
#include <unistd.h> | |
int main(int argc, char *argv[]) { | |
DIR *dir; | |
unsigned long count = 0, unlinked = 0; | |
struct dirent *ent; | |
int ret; |
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
#include <algorithm> | |
#include <iostream> | |
#include <map> | |
#include <string> | |
#include <utility> | |
#include <vector> | |
typedef std::map<const std::string, unsigned> map_t; | |
typedef std::pair<unsigned, const std::string*> pair_t; | |
typedef std::vector<pair_t> array_t; |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use File::Find; | |
use Digest::MD5; | |
my %files; | |
sub wanted { |
OlderNewer