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
class Foo | |
def bar | |
puts "Hello, world!x" | |
end | |
end |
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 Event::Lib; | |
use Data::Dumper; | |
use MysqlAsync; | |
use AsyncCaller qw/schedule/; | |
$Data::Dumper::Terse = 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
$ 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 |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1="\w\$(parse_git_branch) $ " |
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 | |
# 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') |
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
1: C | |
2: PHP | |
3: JavaScript | |
4: C++ | |
5: Java | |
6: Ruby | |
7: Emacs Lisp | |
8: Python | |
9: Perl | |
10: C Sharp |
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/local/bin/perl6 | |
my %pwd-for; | |
for $*IN.lines() { | |
if $_ ~~ /^(\d+)\s+(\S+)/ { | |
%pwd-for{~$0} = ~$1; | |
} | |
} | |
my @types = |
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
# Newbie programmer | |
$input=<>; | |
sub factorial { | |
$s=1; | |
$r=1; | |
while ($s <= $input) { | |
$r *= $s; | |
$s++; | |
} | |
if($input == 0) |
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
=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 |
OlderNewer