This file contains hidden or 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, |
This file contains hidden or 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 |
This file contains hidden or 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] } |
This file contains hidden or 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 | |
| ); |
This file contains hidden or 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 ); |
This file contains hidden or 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') |
This file contains hidden or 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. |
This file contains hidden or 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", |
This file contains hidden or 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', | |
| ); |
This file contains hidden or 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