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
git log --name-status --pretty=format:'' --author=authorname | sort | uniq |
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
perl -ne 'lc; $total = length; s/[^l]//g; print "Total: $total\tLs: " . length($_) . "\n";' |
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
# A one-liner to ensure that $seconds_since_the_hour % $NO will distribute equally. | |
perl -Mstrict -e 'my $NO = 6; my @a = (); push @a, int rand(60) for(1 .. 1_000); my %b = (); $b{$_ % $NO}++ for(@a); print "$_ => $b{$_}\n" for sort { $a <=> $b } keys %b;' |
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
--- perldoc-server.original 2009-09-04 14:23:55.000000000 +0800 | |
+++ perldoc-server 2009-09-04 14:35:57.000000000 +0800 | |
@@ -31,6 +31,7 @@ | |
GetOptions(\%options, | |
'perl=s', | |
'port=i', | |
+ 'search|l=s@', | |
'public', | |
'help|h|?' => sub{pod2usage(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; | |
use warnings; | |
# This is intended as an easy-to-use cookbook example to getting started | |
# uploading files on Perl. Please let me (gaurav at ggvaidya dot com) know | |
# if you have any comments or suggestions for this example. | |
# | |
# It is made available under the same license terms as the Perl interpreter. |
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
Index: plugins/python/naturepreceedings.py | |
=================================================================== | |
--- plugins/python/naturepreceedings.py (revision 581) | |
+++ plugins/python/naturepreceedings.py (working copy) | |
@@ -107,7 +107,7 @@ | |
abs = abstract.renderContents().strip() | |
abs = re.sub(r'<[^>]+>','',abs) | |
abs = unescape(abs) | |
- print "abstract\t%s" % abs | |
+ print "abstract\t%s" % abs.encode('utf-8') |
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
" Activate pathogen. | |
call pathogen#infect() | |
call pathogen#helptags() | |
" These are a few of my favourite settings. | |
syntax on | |
set background=dark | |
set hlsearch | |
set incsearch | |
set smartindent |
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 | |
# This is the program I wrote to crack this fun little cipher: http://keiththomsonbooks.com/cipher-02022012.html | |
# The clue clearly indicates that this is just a simple substitution cipher [1]; even better, it looks like ROT13 [2], | |
# except that you clearly don't move every letter along by exactly 13 places. So how many letters do you need to move | |
# it along by? There's only 26 letters in the English alphabet: let's try every possible value! | |
# | |
# [1] http://en.wikipedia.org/wiki/Substitution_cipher | |
# [2] http://en.wikipedia.org/wiki/ROT13 |
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
Atom Zombie Smasher | |
Commander: Gaurav | |
Start date: April 26, 2011 | |
Zeppelin: Five Howling Zeppelin | |
Codename: OperationProngLightning135 | |
---------------------------------- | |
JANUARY 1961: AURORA AUSTRALIS. | |
Shorter daytime. |
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 5.0100; | |
use strict; | |
use warnings; | |
# Load the SeqIO module. | |
use Bio::SeqIO; |
OlderNewer