Skip to content

Instantly share code, notes, and snippets.

View beppu's full-sized avatar

John Beppu beppu

View GitHub Profile
@beppu
beppu / imgur
Created October 27, 2010 10:00
If you ever need to bulk upload many URLs to imgur.com, this is the tool for you.
#!/usr/bin/env perl
use common::sense;
use AnyEvent;
use AnyEvent::HTTP;
use JSON;
# Get your API key here:
# http://imgur.com/register/api_anon
my $imgur_api_key = '69696969696969696969696969696969'; # XXX - replace me
my $imgur_upload = 'http://api.imgur.com/2/upload.json';
http://www.enterprisecorruption.com/
actor02-aug-01-12-11ss
.. we are there to secure those nations on our citizen’s dimes..
for the financial benefit of our citizen’s so-called.. economic “competitors” in china
#!/usr/bin/perl
use common::sense;
use Web::Scraper;
use Data::Dump 'pp';
use URI;
use IO::All;
use aliased 'Squatting::H';
my $url_pattern = "http://www.enterprisecorruption.com/?page_id=%d";
my @id = qw( 41 42 11 43 44 50 51 45 9 46 47 48 10 49 );
/**
*
*/
package com.nugporn.xxx;
import java.io.IOException;
import java.util.ArrayList;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@beppu
beppu / nb
Created January 6, 2010 15:52
#!/usr/bin/env perl
use common::sense;
use EV;
use AnyEvent;
use AnyEvent::DNS;
use Coro;
use Coro::AnyEvent;
use Data::Dump 'pp';
use Getopt::Long;
@beppu
beppu / Problem.pm
Created January 5, 2010 22:58
If a .psgi file and a .cgi file use the same .pm that happens to have an exit in it, CGI::Compile won't catch the exit.
package Problem;
sub main {
print "The following exit does not get caught.\n";
exit;
}
1;
use IO::File;
use Plack::Builder;
#
# 1. Start the server like this:
# plackup -a logger.psgi -e test -s Coro
#
# 2. Tail the access_log
# touch access_log
# tail -f access_log
#!/usr/bin/env perl
use strict;
use warnings;
# Inheritance Hierarchy
#
# A
# \
# B
@beppu
beppu / slowapp.pl
Created October 14, 2009 23:46
Continuity version of slowapp.psgi (from Plack)
#!/usr/bin/env perl
use strict;
use warnings;
use Continuity;
use Coro::Timer;
my $server = Continuity->new(
port => 4488,
cookie_session => 1,
package JSONP;
use strict;
use warnings;
use base 'Squatting';
# How to send JSONP responses with Squatting
# ==========================================
#
# save this as JSONP.pm
# run it by typing: squatting JSONP