This file contains 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 5.010; | |
use autodie; | |
use DBI; | |
use Encode; | |
use IO::Handle; | |
use SQL::Abstract; |
This file contains 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
# vim:ft=perl | |
{ | |
database => ['dbi:SQLite:dbname=irc.sqlite3', '', ''], | |
patterns => [ | |
[qr/<\s*[@%&~\+]?\s*(?<nick>[^\s]+)>\s*(?<body>.+)$/ => 'message'], | |
], | |
} |
This file contains 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::Ircql::Query::NicksByMessages; | |
use strict; | |
use warnings; | |
use Sub::Exporter -setup => { | |
exports => [ qw(nicks_by_messages) ], | |
groups => { | |
default => [ qw(nicks_by_messages) ], | |
}, |
This file contains 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
source: | |
name: coreutils | |
version: 8.4 | |
archives: | |
- http://ftp.gnu.org/gnu/coreutils/coreutils-8.4.tar.xz | |
buildsystem: autoconf |
This file contains 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
var http = require('http'); | |
var url = require('url'); | |
http.createServer(function (req, res) { | |
var u = url.parse(req.url); | |
var c = http.createClient(u.port || 80, u.host); | |
console.log(req.method + ' ' + req.url); | |
p = (u.pathname || '/') + (u.search || ''); | |
hdr = req.headers; | |
hdr['host'] = u.host; |
This file contains 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
# Drop all IPv6, we don't use or need it | |
domain ip6 table filter chain (INPUT FORWARD OUTPUT) DROP; | |
# Reject TCP with an RST and everything else with ICMP | |
@def &REJECT() = { | |
proto tcp REJECT reject-with tcp-reset; | |
REJECT reject-with icmp-admin-prohibited; | |
} | |
# Challenge boilerplate |
This file contains 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
ip prefix-list bgp4in description announce only | |
ip prefix-list bgp4in seq 5 permit 172.22.0.53/32 | |
ip prefix-list bgp4in seq 10 deny 172.22.72.0/23 le 32 | |
ip prefix-list bgp4in seq 20 permit 172.22.254.0/23 ge 27 le 30 | |
ip prefix-list bgp4in seq 25 deny 192.168.0.0/22 le 32 | |
ip prefix-list bgp4in seq 26 deny 192.168.178.0/24 le 32 | |
ip prefix-list bgp4in seq 27 deny 192.168.100.0/24 le 32 | |
ip prefix-list bgp4in seq 30 permit 192.168.0.0/16 ge 24 le 28 | |
ip prefix-list bgp4in seq 35 deny 10.10.10.0/24 le 32 |
This file contains 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 Modern::Perl; | |
use XML::XSPF; | |
my $playlist = XML::XSPF->parse($ARGV[0]); | |
for my $track ($playlist->trackList) { | |
say $track->location if $track->location; | |
} |
This file contains 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
re.pl(Devel::REPL::Plugin::Packages::DefaultScratchpad):032:0> say $_->{type}, ' ', $_->{name}, ' ', $_->{content} for @{ $r->{resData}->{record} }; | |
A announce.skyshaper.org 85.214.106.18 | |
A git.skyshaper.org 85.214.106.18 | |
A restricted.skyshaper.org 85.214.106.18 | |
A skyshaper.org 85.214.106.18 | |
A www.skyshaper.org 85.214.106.18 | |
MX skyshaper.org ALT2.ASPMX.L.GOOGLE.COM | |
MX skyshaper.org ASPMX2.GOOGLEMAIL.COM | |
MX skyshaper.org ASPMX3.GOOGLEMAIL.COM |
This file contains 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
var http = require('http'); | |
var url = require('url'); | |
var pattern = /4chan\.org/i; | |
function respond_censored(res) { | |
res.writeHead(403) | |
res.write('Censored'); | |
res.end(); | |
} |