Skip to content

Instantly share code, notes, and snippets.

@rblackwe
rblackwe / foo.rb
Created November 14, 2008 14:05 — forked from bhb/foo.rb
class Foo
def bar
puts "Hello, world!x"
end
end
@rblackwe
rblackwe / gist:25647
Created November 17, 2008 03:12 — forked from jzawodn/gist:24692
#!/usr/bin/perl -w
use strict;
use Event::Lib;
use Data::Dumper;
use MysqlAsync;
use AsyncCaller qw/schedule/;
$Data::Dumper::Terse = 1;
$ visitcpan -a=dist -q -- perl -E 'my @found = grep { $_ ne "Makefile.PL" && $_ ne "Build.PL" } glob "*.PL"; say "@ARGV : ", join(", ", @found) if @found'
AALLAN/Astro-ADS-1.20.7.tar.gz : adsquery.PL
AALLAN/Astro-Catalog-2.1.2.tar.gz : catalogs.PL, finder.PL, supercosmos.PL
AALLAN/Astro-Catalog-2.1.3.tar.gz : catalogs.PL, finder.PL, supercosmos.PL
AMALTSEV/XAO-Base-1.06b.tar.gz : BaseConfig.PL
AMAR/Wizard-0.1003.tar.gz : apacheAdmin.PL, wizard.PL
AMAR/Wizard-LDAP-0.1004.tar.gz : ldapAdmin.PL, ldapWizard.PL
AMAR/Wizard-LDAP-0.1006.tar.gz : ldapAdmin.PL, ldapWizard.PL
ASAVIGE/Acme-EyeDrops-1.55.tar.gz : xBuild.PL
@rblackwe
rblackwe / .bashrc
Created March 2, 2009 14:59 — forked from tekkub/.bashrc
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\w\$(parse_git_branch) $ "
#!/bin/bash
# I use this to create a gh-pages branch on new repos
if [ ! -d .git ]; then
echo "Must be in a repository directory!"
exit
fi
wd_clean=$(git status | grep 'nothing to commit')
1: C
2: PHP
3: JavaScript
4: C++
5: Java
6: Ruby
7: Emacs Lisp
8: Python
9: Perl
10: C Sharp
#!/usr/local/bin/perl6
my %pwd-for;
for $*IN.lines() {
if $_ ~~ /^(\d+)\s+(\S+)/ {
%pwd-for{~$0} = ~$1;
}
}
my @types =
#!/usr/bin/env perl
use strict;
use warnings;
use feature ':5.10';
use Term::ReadKey;
use AnyEvent::Subprocess;
$|=1;
# Newbie programmer
$input=<>;
sub factorial {
$s=1;
$r=1;
while ($s <= $input) {
$r *= $s;
$s++;
}
if($input == 0)
=pod
Get the game.png from http://i.imgur.com/FxgMM.png
=head1 INSTALL
For windows get strawberry perl
Then do:
cpan pip Alien::SDL