- gopher://dgl.cx/1/~dgl/
- https://dgl.cx
- @dgl# 🔥 follow me on mastodon! 🐘 @infosec.exchange
This file contains hidden or 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
| mkdir -p rsync/dg | |
| rsync -a rsync://countries-ns.mdc.dk/zone/ rsync | |
| cat rsync/zz.countries.nerd.dk.rbldnsd zz.countries.nerd.dk.rbldnsd.add > \ | |
| rsync/dg/zz.countries.nerd.dk.rbldnsd |
This file contains hidden or 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
| ### Keybase proof | |
| I hereby claim: | |
| * I am dgl on github. | |
| * I am dgl (https://keybase.io/dgl) on keybase. | |
| * I have a public key whose fingerprint is 8EDA D6F5 ADC2 1C86 D1E2 32F3 F2E7 F1A7 E4D4 D21B | |
| To claim this, I am signing this object: |
This file contains hidden or 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/perl | |
| use strict; | |
| use threads; | |
| use threads::shared; | |
| use warnings; | |
| use 5.12.0; | |
| use Archive::Peek::Libarchive; | |
| use Parse::CPAN::Packages; | |
| use Path::Class; | |
| use Term::ANSIColor; |
This file contains hidden or 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 a; | |
| sub foo { | |
| warn "foo"; | |
| } | |
| sub rebind { | |
| no warnings "redefine"; | |
| eval q{delete $a::{foo}}; | |
| eval q{*foo = sub { warn "bar" }}; |
This file contains hidden or 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 Aaaaaaaa::Test; | |
| use Test::More (); | |
| sub import { | |
| local $_[0] = "Test::More"; | |
| goto \&{Test::More->can("import")}; | |
| } | |
| 1; |
This file contains hidden or 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
| #!/bin/sh | |
| # installblead: An install script that installs a development version of perl | |
| # (from git) and keeps a particular set of modules installed. Sort of perlbrew | |
| # for blead, but not quite. | |
| # Usage: | |
| # wget -O ~/bin/installblead https://gist.github.com/raw/792206/installblead | |
| # chmod +x ~/bin/installblead | |
| # | |
| # git clone git://perl5.git.perl.org/perl # or git pull, whatever |
This file contains hidden or 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
| use Test::More tests => 1; | |
| ok 0; | |
| unless(Test::More->builder->is_passing) { | |
| diag `cat config.h`; | |
| } |
This file contains hidden or 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
| #!/bin/sh | |
| # © 2010 David Leadbeater; https://dgl.cx/licence | |
| # Use GDB to examine a non-executable file. The file will be loaded starting at | |
| # byte 0 in memory, you can then use normal GDB commands such as "x/s 0". | |
| if [ $# -lt 1 ]; then | |
| echo "Usage: $0 file" | |
| exit 1 | |
| fi |
This file contains hidden or 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/perl | |
| use Text::VimColor; | |
| # This is the output of :hi pasted in, season to taste | |
| my $colors = <<EOF; | |
| SpecialKey xxx term=bold cterm=bold ctermfg=4 guifg=Cyan | |
| NonText xxx term=bold cterm=bold ctermfg=4 gui=bold guifg=Blue | |
| Directory xxx term=bold cterm=bold ctermfg=6 guifg=Cyan | |
| ErrorMsg xxx term=standout cterm=bold ctermfg=7 ctermbg=1 guifg=White guibg=Red | |
| IncSearch xxx term=reverse cterm=reverse gui=reverse |
This file contains hidden or 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
| use v5.10; | |
| use JSON; | |
| use JSON::PP(); | |
| use Data::MessagePack; | |
| use MongoDB (); # For MongoDB::BSON, which needs the whole driver it seems. | |
| use Storable qw(freeze thaw); | |
| use Benchmark qw(cmpthese); | |
| my $fat = { |