Skip to content

Instantly share code, notes, and snippets.

View books-i-want
Telling True Stories: A Nonfiction Writers' Guide from the Nieman Foundation at Harvard University
Beyond Style: Mastering the Finer Points of Writing
Make Every Word Count
100 Ways to Improve Your Writing
Make Your Words Work
@kimmel
kimmel / series_download.pl
Created Oct 15, 2013
Collect a numbered series of pages
View series_download.pl
#!/usr/bin/env perl
use v5.14;
use warnings;
use autodie qw( :all );
use utf8::all;
use List::Util qw( shuffle );
use WWW::Mechanize;
@kimmel
kimmel / .nanorc
Created Jun 2, 2013
My .nanorc settings
View .nanorc
set smooth
set historylog
set mouse
set tabsize 2
set tabstospaces
## Assembler
include "/usr/share/nano/asm.nanorc"
@kimmel
kimmel / gist:5584109
Last active Jul 1, 2016
Cleaning up processes with Proc::ProcessTable
View gist:5584109
use v5.16;
use warnings;
use autodie qw( :all );
use utf8::all;
use POSIX qw( strftime );
use Parallel::ForkManager;
use Proc::ProcessTable;
my $process_count = 12;
@kimmel
kimmel / gist:5584103
Created May 15, 2013
Parallel::ForkManager example
View gist:5584103
use v5.16;
use warnings;
use autodie qw( :all );
use utf8::all;
use Parallel::ForkManager;
my $process_count = 12;
sub run_list {
@kimmel
kimmel / .tmux.conf
Last active Dec 4, 2016
tmux configuration for butt instances.
View .tmux.conf
# scroll history
set -g history-limit 40000
#
# mouse / keyboard
#
set -g mouse on
# scroll wheel history - https://github.com/tmux/tmux/issues/145
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
@kimmel
kimmel / checksite.pl
Created Mar 17, 2013
A sample WWW::CheckSite application
View checksite.pl
#!/usr/bin/perl
use v5.16;
use warnings;
use autodie qw( :all );
use utf8::all;
use POSIX qw( strftime );
use WWW::CheckSite;
@kimmel
kimmel / comments_bench.pl
Created Nov 18, 2012
A benchmark of regex methods
View comments_bench.pl
#!/usr/bin/perl
use v5.16;
use warnings;
use autodie qw( :all );
use utf8::all;
use File::Slurp qw( read_file );
use List::MoreUtils qw( uniq );
use Regexp::Assemble;
use Benchmark qw( cmpthese :hireswallclock );
@kimmel
kimmel / content_encoding.pl
Last active Oct 11, 2015
List a website's content encoding
View content_encoding.pl
#!/usr/bin/perl
use v5.16;
use warnings;
use autodie qw( :all );
use utf8::all;
use LWP::UserAgent;
use Data::Show;
@kimmel
kimmel / accept_http_compression.pl
Last active Oct 11, 2015
Show decodable HTTP compression formats
View accept_http_compression.pl
#!/usr/bin/perl
use v5.16;
use warnings;
use autodie qw( :all );
use utf8::all;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $can_accept = HTTP::Message::decodable;