View moose_design_pattern.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
package My::App; | |
use 5.010; | |
use Moose; | |
use strict; | |
use warnings; | |
use MooseX::HasDefaults::RO; | |
has [qw( foo bar )] => ( | |
isa => 'Int', | |
required => 1, |
View song_acs.txt
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
770 | |
404 | |
718 | |
203 | |
901 | |
305 | |
312 | |
313 | |
215 | |
803 |
View hop_iterators.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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
$Data::Dumper::Deparse = 1; | |
# syntactic sugar | |
sub NEXTVAL { $_[0]->() } | |
sub Iterator (&) { return $_[0] } |
View ipdb_test.sql
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
PRAGMA foreign_keys = ON; | |
BEGIN TRANSACTION; | |
DROP TABLE IF EXISTS server; | |
CREATE TABLE server ( | |
id INTEGER PRIMARY KEY, | |
name VARCHAR UNIQUE, | |
notes VARCHAR | |
); |
View truth_in_values.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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use 5.010; | |
%hash ? say "Empty Hash is true" : say "Empty Hash is false" ; | |
scalar keys %hash > 0 ? say "Empty Hash is true" : say "Empty Hash is false" ; | |
%hash = ( foo => 1, bar => 2 ); |
View gist:5485689
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
import os | |
import sys | |
import platform | |
import shutil | |
import cPickle | |
org_state_file_path = os.path.expanduser('~/.config/deluge/state/torrents.state') | |
new_state_file_path = os.path.expanduser('~/torrents.state.new') | |
state_file_org = open(org_state_file_path, 'rb') |
View README
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
This is an experimental installer for WebGUI8 that attempts to use the | |
system package manager rather than the WRE. | |
It is currently incomplete -- it doesn't set up WebGUI or MySQL to run | |
at boot time, and it doesn't set up cron, and a few other things. | |
It uses a Curses interface, asking the user about install options | |
(paths and passwords and such), and getting confirmation before running | |
commands. |
View class_def
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 { "authorized-sshkey::root": | |
authorized_keys => { | |
[ | |
{ | |
method => "ssh-rsa", | |
key => "asdf", | |
user => "jon@red5", | |
}, | |
# { | |
# method => "ssh-dsa", |
View gist:3085642
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
package App::SmarterMail::Parser::Thread; | |
use 5.014; | |
use Moose; | |
has 'thread_id' => ( | |
is => 'rw', | |
isa => 'Int', | |
); |
View smartermail_parser
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.014; | |
use Tie::IxHash; | |
use Data::Dumper; | |
my $smartermail_directory = './Prime/'; | |
my $search_string = 'jason@primelogisticsint.com'; | |
# storage vars |
NewerOlder