Skip to content

Instantly share code, notes, and snippets.

@kimmel
kimmel / books-i-want
Last active January 17, 2020 12:41
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 October 15, 2013 16:36
Collect a numbered series of pages
#!/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 June 2, 2013 09:43
My .nanorc settings
set smooth
set historylog
set mouse
set tabsize 2
set tabstospaces
## Assembler
include "/usr/share/nano/asm.nanorc"
@kimmel
kimmel / gist:5584109
Last active July 1, 2016 18:46
Cleaning up processes with Proc::ProcessTable
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 13:46
Parallel::ForkManager example
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 December 4, 2016 07:37
tmux configuration for butt instances.
# 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 March 17, 2013 07:27
A sample WWW::CheckSite application
#!/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 November 18, 2012 08:27
A benchmark of regex methods
#!/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 October 11, 2015 21:47
List a website's content encoding
#!/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 October 11, 2015 21:38
Show decodable HTTP compression formats
#!/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;