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/python | |
from time import strftime | |
import sqlite3 | |
import sys | |
import twitter #http://code.google.com/p/python-twitter/ | |
import feedparser #available at feedparser.org | |
DATABASE = "/Users/goerz/.twitter_bot/tweets.sqlite" |
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
module a_mod | |
use b_mod | |
implicit none | |
public | |
private :: a, b | |
integer, target :: a | |
integer, pointer :: b | |
contains | |
subroutine run_test() | |
a = 1 |
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
partCounter = 1 | |
for part in msg.walk(): | |
if part.get_main_type()=="multipart": | |
continue | |
name = part.get_param("name") | |
if name==None: | |
name = "part-%i" % partCounter | |
partCounter+=1 | |
f = open(name,"wb") | |
f.write(part.get_payload(decode=1)) |
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/perl | |
use strict; | |
# Author: Michael Goerz <[email protected]> | |
# Make sure that $kextfile is owned by root! | |
my $app = '/Applications/InsomniaX.app'; | |
my $kextfile = "$app/Contents/Resources/Insomnia_r6.kext/"; | |
sub close_insomnia_x{ | |
my $ps_line = `ps -A | grep $app | grep -v grep`; |
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 'rubygems' | |
require 'sequel' | |
require 'fileutils' | |
# NOTE: This converter requires Sequel and the MySQL gems. | |
# The MySQL gem can be difficult to install on OS X. Once you have MySQL | |
# installed, running the following commands should work: | |
# $ sudo gem install sequel | |
# $ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config |
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/perl -w | |
use strict; | |
use utf8; | |
############################################################################ | |
# Copyright (C) 2008 by Michael Goerz # | |
# http://www.physik.fu-berlin.de/~mgoerz # | |
# # | |
# 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 # |
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/perl -w | |
use strict; | |
# This program adds a function 'printself' to the end of an existing | |
# perl program, which prints out the entire program's listing. This | |
# will make the existing program to be a Quine | |
# (c)2006 Michael Goerz | |
# michaelgoerz.net | |
# This program is free software; you can redistribute it and/or modify |
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/perl -w | |
use strict; | |
my $historyfile = glob '~/.filter.pl.last'; | |
my $command = ""; | |
system("touch $historyfile"); | |
open(HIST, "$historyfile") or die "Can't open file: $!"; | |
$command = <HIST>; |
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/perl -w | |
use strict; | |
my $recursive = 'true'; | |
md5sum(\@ARGV); | |
sub md5sum{ | |
my $filelist = shift; | |
foreach my $file (@{$filelist}){ | |
if ( -f $file ){ |
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/perl -w | |
use strict; | |
my $recursive = 'false'; | |
if ($ARGV[0] eq '-r') { | |
$recursive = shift @ARGV; | |
$recursive = 'true'; | |
} | |
decrypt(\@ARGV); |
OlderNewer