Skip to content

Instantly share code, notes, and snippets.

Ben Nagy bnagy

Block or report user

Report or block bnagy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bnagy / scansion.ipynb
Created Jun 26, 2018
Teaching a computer to teach me how to scan latin poetry
View scansion.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
bnagy /
Last active May 17, 2020
Mutt, Gmail and GPG

GPG / Mutt / Gmail


This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
# american fuzzy lop - pause a set of fuzzers
# --------------------------------------
# By @rantyben, based on afl-whatsup, which is:
# Written and maintained by Michal Zalewski <>
# Copyright 2015 Google Inc. All rights reserved.
bnagy / afl-llvm-rt.o.c
Last active Jun 13, 2018
AFL SHM with guard pages
View afl-llvm-rt.o.c
american fuzzy lop - LLVM instrumentation bootstrap
Written by Laszlo Szekeres <> and
Michal Zalewski <>
LLVM integration design comes from Laszlo Szekeres.
Copyright 2015 Google Inc. All rights reserved.
bnagy / searchers.rb
Created Aug 13, 2012
trying to make a threadsafe capybara poltergeist searcher
View searchers.rb
require 'capybara'
require 'capybara/dsl'
require 'capybara/poltergeist'
Capybara.configure do |config|
config.run_server = false
config.default_driver = :poltergeist
module Searchers
View pollenate.rb
#! /usr/bin/env ruby
# Pollenate ONE sync dir from each target into all other
# targets fuzzing the same format. Assumes that work
# dirs are named as by
# Each target syncs inside its own directory already
# so copying any of the sync dirs works. It is possible
# that you'll miss some stuff, but it saves N * N-1 sync
View extension_map.rb
ARGF.each_line {|line|
warn "Starting work on #{line.chomp}"
# expect a line like this:
# s3://commoncrawl-crawl-002/2010/09/24/9/1285380159663_9.arc.gz
proto,unused,bucket_name,*rest=line.chomp.split File::SEPARATOR
raise ArgumentError, "#{__FILE__}: Unknown S3 Protocol #{proto}" unless proto=~/^s3/
object_name=File.join rest
size=Integer( s3.buckets[bucket_name].objects[object_name].content_length )
warn "Reading from #{bucket_name.inspect}, #{object_name.inspect}, size #{size}"
View extension_map.rb
class ArcFile
include Enumerable
def initialize( input_stream )
def each
return self.to_enum unless block_given?
View ntstatus.rb
'STATUS_SUCCESS' => "0x00000000",
'STATUS_SEVERITY_SUCCESS' => "0x00000000",
'STATUS_SEVERITY_WARNING' => "0x00000002",
'STATUS_SEVERITY_ERROR' => "0x00000003",
'STATUS_WAIT_0' => "0x00000000",
'STATUS_WAIT_1' => "0x00000001",
'STATUS_WAIT_2' => "0x00000002",
'STATUS_WAIT_3' => "0x00000003",
View gist:5175611
class Player
def initialize(name, health=100)
@name = name.capitalize
@health = health
def say_hello
puts "I'm #{@name} with a health of #{@health}."
You can’t perform that action at this time.