Skip to content

Instantly share code, notes, and snippets.

View throughnothing's full-sized avatar

William Wolf throughnothing

View GitHub Profile
@throughnothing
throughnothing / README.md
Last active September 25, 2015 12:18
Setup my dotfiles on a new box

Use

curl throughnothing.com/dotfiles.sh | bash
bash <(curl throughnothing.com/dotfiles.sh)

To use with a specific branch:

curl throughnothing.com/dotfiles.sh | bash -s BRANCH 

bash <(curl throughnothing.com/dotfiles.sh) BRANCH

@throughnothing
throughnothing / gist:936021
Created April 22, 2011 04:37
PRU examples -> Perl
# grep --- all lines including foo
ls -al | grep foo
ls -al | pru /foo/
ls -al | perl -ne 'print if /foo/'
perl -E 'say for <*foo*>'
# grep --- all lines including current date
ls -al | grep $(date +"%Y-%m-%d")
ls -al | pru 'include?(Time.now.strftime("%Y-%m-%d"))'
ls -al | perl -MTime::Piece -ne '$d=localtime->strftime("%Y-%m-%d");print if /$d/'
@throughnothing
throughnothing / instapaper epub download
Created April 26, 2011 00:52
script to download instapaper feed in epub format
#!/usr/bin/env perl
use v5.10;
use DateTime;
use HTTP::Request;
use LWP::UserAgent;
use HTTP::Cookies;
my $user = '';
my $pass = '';
@throughnothing
throughnothing / gist:947700
Created April 29, 2011 01:50
Hard coded paths for app indicator icon
appdir = '/usr/share/octoindicator/media/'
self.ind = appindicator.Indicator ("octo-indicator",
os.path.join(appdir,"octocat.png"),
appindicator.CATEGORY_COMMUNICATIONS)
self.ind.set_status (appindicator.STATUS_ACTIVE)
self.ind.set_attention_icon (os.path.join(appdir,"octocat-active.png"))
@throughnothing
throughnothing / PostBack.pm
Created October 18, 2011 20:28
Github Postback receiver for announcing events in IRC using Bot::BasicBot::Pluggable::Module
use v5.12;
package Bot::BasicBot::Pluggable::Module::GitHub::PostBack;
use base qw(Bot::BasicBot::Pluggable::Module);
use POE qw/Component::Server::HTTP/;
use CGI::Simple;
use JSON qw(from_json);
sub help {
my ($self, $msg) = @_;
@throughnothing
throughnothing / Readme.md
Created October 28, 2011 23:11
Get epub from instapaper, lwp version

Download Instapaper Epub and put it on my Nook

Simply set the $user and pass variables, then run instapaper.pl when your Nook is plugged in and it will automatically download your instapaper feed to your nook.

@throughnothing
throughnothing / Aurora-Profiles
Created March 16, 2012 16:11
Applescript to run multiple firefox instances with the profilemanager
do shell script "open -n -a aurora --args -profilemanager"
@throughnothing
throughnothing / gist:2155004
Created March 22, 2012 01:23
Using Dancer::Logger::ConsoleAggregator in a non web-app contxt
#!/usr/bin/env perl
use Dancer ':syntax';
use Dancer::Factory::Hook;
set logger => 'consoleAggregator';
debug "testing testing 123";
Dancer::Factory::Hook->instance->execute_hooks('after');
debug "test numero dos";
@throughnothing
throughnothing / gist:2158269
Created March 22, 2012 13:09
decoding blessed JSON objects using file descriptors =(
use v5.10;
#use JSON -convert_blessed_universally;
package MyJSON;
use base "JSON::PP";
use overload;
use Data::Dumper;
use Carp ();
use B ();
use Scalar::Util 'reftype';
@throughnothing
throughnothing / test.pl
Created April 12, 2012 20:33
Moose Package Foolishness
package Test;
use Moose;
has m => ( is => 'rw', default => sub { "Hello, World!" } );
sub run {
my $t = Test->new;
print $t->m . "\n";
}