Skip to content

Instantly share code, notes, and snippets.

View Packetslave's full-sized avatar

Brian Landers Packetslave

View GitHub Profile
@Packetslave
Packetslave / keybase.md
Created September 9, 2016 22:34
keybase.md

Keybase proof

I hereby claim:

  • I am packetslave on github.
  • I am packetslave (https://keybase.io/packetslave) on keybase.
  • I have a public key ASBUxsCLanw20_RHLNawrDAjLGho4LLQpnJwfJ6k3jL6aAo

To claim this, I am signing this object:

7/11/15 10:59:16.407 PM WindowServer[295]: **DMPROXY** (2) Found `/System/Library/CoreServices/DMProxy'. Run with arg = -login
7/11/15 10:59:16.442 PM DMProxy[75811]: AMBD Services: connection interrupted: com.apple.AmbientDisplayAgent (Connection interrupted)
7/11/15 10:59:16.448 PM WindowServer[295]: CGXSetDisplayColorProfile: Display 0x2b3459cd: Unit 1; ColorProfile { -440608998 }
7/11/15 10:59:16.452 PM com.apple.AmbientDisplayAgent[345]: AmbientDisplayAgent started
7/11/15 10:59:16.484 PM com.apple.AmbientDisplayAgent[345]: AMBD initializing devices
7/11/15 10:59:16.549 PM WindowServer[295]: CGXSetDisplayColorProfileAndTransfer: Display 0x042c0140: Unit 0; ColorProfile { 1757967274 }; TransferFormula (1.000000, 1.000000, 1.000000)
7/11/15 10:59:16.567 PM WindowServer[295]: CGXSetDisplayColorProfileAndTransfer: Display 0x2b3459cd: Unit 1; ColorProfile { -440608998 }; TransferFormula (1.000000, 1.000000, 1.000000)
7/11/15 10:59:16.595 PM WindowServer[295]: CGXSetDisplayColorProfileAndTransfer: Display 0x04
#!/bin/env python
"""
Twitter Coding Challenge
#SREcon 2014
Collect samples of Linux kernel network statistics and report the minimum,
maximum, and average delta for each over a given interval.
Uses the Google gflags module for parsing command-line arguments.
Available on PyPI (pip install python-gflags)
@Packetslave
Packetslave / bitwise.py
Last active December 29, 2015 18:39
Bitwise operations in Python
import unittest
def lsb(i):
"""Return the position of the first (lowest) bit that's set."""
if not i:
return 0
count = 1
while i:
$ traceroute6 -m 120 tng.prolixium.com
traceroute to tng.prolixium.com (2001:48c8:1:137::32), 120 hops max, 24 byte packets
[snip]
11 v6-seattle-ix.voxel.net (2001:504:16::745f) 209.28 ms 207.781 ms 207.18 ms
12 3890.te6-2.tsr1.lga3.us.voxel.net (2001:48c8::8c9) 277.482 ms 279.604 ms 277.079 ms
13 0.ae1.tsr1.lga5.us.voxel.net (2001:48c8::822) 282.205 ms 286.997 ms 276.887 ms
14 0.ae2.csr2.lga6.us.voxel.net (2001:48c8::82e) 280.187 ms 284.989 ms 277.817 ms
15 em0.dax.prolixium.net (2001:48c8:1:2::2) 277.495 ms 277.68 ms 277.61 ms
16 si3.starfire.prolixium.net (2001:48c8:1:1ff::1a) 311.417 ms 305.949 ms 305.109 ms
17 0.re0.ra.prolixium.net (2001:48c8:1:119::2) 307.72 ms 305.633 ms 305.915 ms
blanders@smurfette ~/src
% virtualenv dotcloud
New python executable in dotcloud/bin/python
Installing setuptools............done.
Installing pip...............done.
blanders@smurfette ~/src
% cd dotcloud
blanders@smurfette ~/src/dotcloud
% ./bin/pip install dotcloud
Downloading/unpacking dotcloud
@Packetslave
Packetslave / description.pl
Created March 8, 2011 01:46
Generate IOS interface descriptions from an (exported) excel file
#!/usr/bin/perl
#
# Generate interface configs from an exported Excel file
#
# - assumes the file is exported as tab-delimited
# - assumes the first column is the interface name
# - joins all other fields into the description
#
# $ cat interfaces.txt
#
@Packetslave
Packetslave / lease.py
Created February 27, 2011 04:24
Get the lease expiration on MacOS X
#!/usr/bin/python
from datetime import datetime, timedelta
import os, plistlib
pl = plistlib.readPlist('/var/db/dhcpclient/leases' + "/" + \
os.listdir('/var/db/dhcpclient/leases')[0])
print "Lease expires: %s" % (pl['LeaseStartDate'] + \
timedelta(seconds=pl['LeaseLength']))
@Packetslave
Packetslave / nfsping.spec
Created January 3, 2011 02:59
Quick and dirty RPM spec file for NFSping
%define name nfsping
%define release 1
%define version 1.0
%define buildroot %{_topdir}/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: NFSping
License: BSD
Name: %{name}
Version: %{version}
@Packetslave
Packetslave / statseeker2pdf
Created October 1, 2010 04:19
Script to export statseeker reports as PDF files
#!/usr/bin/env ruby
######################################################################
# Statseeker to PDF Report Generator
#
# Author: Brian Landers <blanders@sapient.com>
# Date: 2010-10-01
#
# Requirements:
#
# - ActionMailer 3.0 -- http://www.rubyonrails.org