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 | |
""" | |
Description: Binary animation screensaver | |
Usage: python binanim.py | |
Strike a key or move the mouse to exit. | |
You can pass the class constructor a dictionary of config values: |
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
<?php | |
/** | |
* Create English List | |
* | |
* I wrote this in 2007 for a project I was working on. | |
* | |
* Converts arrays like (1,2,3) to a list in English like: "1, 2 and 3" | |
* If only two array elements exist it returns: "1 and 2" | |
* If only one array element exists it returns: "1" | |
* If zero array element exists it returns: "" |
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 | |
# Easy port scanner | |
# I wrote this in the 90s to help learn socket programming | |
# ./quickscan -h for usage | |
use Socket; | |
$| = 1; # so \r works right | |
my ($ip, $protocol, $port, $myhouse, $yourhouse, $log); |
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 | |
# I wrote this in ~2002 as a proof of concept | |
# Sample X-Chat script to make IRC project collaboration easier. | |
$password = "Pcollab_Password"; # Project password | |
@nicks = ("nick1", "nick2", "nick3"); # Array of nicks working on the project | |
IRC::register("Pcollab Script", "0.1", "", ""); | |
IRC::print "Loading Pcollab Script...\n"; | |
IRC::add_message_handler("PRIVMSG", "privmsg_handler"); |
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 | |
# gotmail.pl -By Ryan Kulla | |
# I wrote this in the '90s to help learn perl | |
# Notifies you audibly when you have new mail. | |
# Created for fun. Rename to gotmaild, add to startup scripts, to make real daemon. | |
use POSIX; | |
$MAILBOX = "/path/to/mbox"; # change this to your actual mailbox | |
$PLAY_SOUND = "mplayer /path/to/alert.mp3"; # change to preferred player and sound 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/env python | |
# joescan.py -By Ryan Kulla | |
# I wrote this in ~1999 as one of my first python programs | |
# Scans for user accounts who use their username as their password. | |
from crypt import crypt | |
from pwd import getpwall, getpwnam | |
from getpass import getuser | |
PASSWD_FILE = getpwall() |
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 | |
# portell.py -by Ryan Kulla | |
# I wrote this in ~2001 just for fun | |
# Description: Lookup a BSD (FreeBSD, et al) system's Port package's description instantly. | |
# Creates an index of existing Ports for easy and quick look up. | |
# Usage: portell.py <portname> | |
import sys, os, shelve | |
try: |
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
/* gwhich.c -by Ryan Kulla | |
* GTK+ front-end wrapper around the which(1) command. | |
* Compile with: gcc gwhich.c -o gwhich `pkg-config --cflags --libs gtk+-2.0` | |
* Usage: gwhich | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <gtk/gtk.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 | |
# vsrcrb.rb by Ryan Kulla (http://rkulla.com). | |
# Note that it only works on a *nix OS (OSX, Linux, etc). Not Windows. | |
# Command-line program to output standard library module source | |
# Install: $ mkdir ~/bin ; mv -i vsrcrb.rb ~/bin/vsrcrb ; chmod u+x ~/bin/vsrcrb | |
# Usage: $ vsrcrb <module-name-without-extension> | |
# Example: View socket.rb's source code: $ vsrcrb socket | less | |
# To view a gem's src: $ less $(gem which <gem>) | |
def get_source_paths(target_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
My notes and shortcuts for working with Michael Hartl's great Rails tutorial | |
(http://ruby.railstutorial.org/) | |
- Since he has you install RVM in the very first chapter, I recommend actually using it | |
immediately rather than getting in the habit of typing out "bundle exec" all of the time | |
or forgetting to create and switch to gemsets. I recommend running this right away: | |
$ rvm use 1.9.3@sample_app --create | |
This way if you're reading other tutorials too, and want to experiment with gems they |
OlderNewer