Skip to content

Instantly share code, notes, and snippets.

hacking on things at Berkman <3

Griffin Boyce glamrock

hacking on things at Berkman <3
Block or report user

Report or block glamrock

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
View gist:da78be919ded11bcb799b2af111b7526
def insert_comma(mystring, position):
mystring[:position] + ',' + mystring[position:]
offset = 0
for magic_number in magic_numbers:
position = magic_number + offset
mystring = insert_comma(mystring, position)
offset += 1
glamrock / RETA-2000example.dat
Created Oct 22, 2018
One RETA entry from 2000
View RETA-2000example.dat
117LANPD001C7004348817Y 0812823530121000484674036598000000000 000000000 0004658280000000000000000002Y0NNEW ORLEANS LA CHIEF OF POLICE RECORDS & IDENTIFICATION 715 SOUTH BROAD STREET NEW ORLEANS, LA 701191170E1 0008300022222PPPP0000000000000030000200001000010000100000000000000000001000000000000000000000000100000000000000000000000010000000000000000000000006000000000000010000000002200021000010022600140000140001300059001910008500045000490000000012003840030300059000220140300571003800012500066028070000000000000050000000009000090000000071000410000000008000220017000063000430005300000000110007300056000160000100388000690005500010000040078500000000000000000000000000000000000000090000100000000020000600016000050000400004000000000300010000090000100000000470001600010000030000300098000000000000000000000210008300055555PPPP0000000000000030000300000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
glamrock /
Created May 9, 2018 — forked from peta/
Simple bash script for migrating MySQL databases (including all associated user accounts) to a remote server. Use it with care because the usage of mysqldump in this script solely relies on default values which may vary greatly on your machine. (mysqldump is a powerful tool, so don't miss `man mysqldump`).
# Copyright (c) 2005 nixCraft project <>
# This script is licensed under GNU GPL version 2.0 or above
# Source:
# Author Vivek Gite <>,
# Peter Geil <>
# ------------------------------------------------------------
# SETME First - local mysql user/pass
glamrock / .vimrc
Created Jun 19, 2017 — forked from assaf/.vimrc
View .vimrc
version 7.0
if &cp | set nocp | endif
let s:cpo_save=&cpo
set cpo&vim
let &cpo=s:cpo_save
unlet s:cpo_save
set cscopeprg=/usr/bin/cscope
set cscopetag
set cscopeverbose
set fileencodings=utf-8,latin1
glamrock / .vimrc
Created Jun 8, 2017
hella vimrc options
View .vimrc
" Include user's local vim before config
if filereadable(expand("~/.vimrc.before"))
source ~/.vimrc.before
"" Basic Setup
set nocompatible " use vim, no vi defaults
glamrock / .gitconfig
Created Jun 6, 2017 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
View .gitconfig
# Working with branches
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
#! /bin/bash
while read IP; do
echo ""
echo "$IP"
whois "$IP" | grep descr
whois "$IP" | grep changed
dig -x "$IP" +short | head -1
glamrock /
Created Mar 30, 2017 — forked from yanofsky/
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
glamrock / etc - ganglia - gmond.conf
Last active Mar 6, 2017
ganglia default config files
View etc - ganglia - gmond.conf
/* This configuration is as close to 2.5.x default behavior as possible
The values closely match ./gmond/metric.h definitions in 2.5.x */
globals {
daemonize = yes
setuid = yes
user = ganglia
debug_level = 0
max_udp_msg_len = 1472
mute = no
deaf = no
glamrock /
Last active Mar 1, 2017
Ganglia rrd export / import
#! /bin/bash -xe
# Note: run from /var/lib/ganglia directory, no need for subdir
# Run with: find /var/lib/ganglia/rrds/ -type d -exec sh -c 'cd "{}" ; /var/lib/ganglia/ ;' \;
# backup current rrd files -- tar all and place in /tmp
tar --exclude='*.xml' -cvf /tmp/rrds-"$(date --date='now' +%F-%R)".tar rrds/*
echo "Backed up files in /tmp"
#Pull in rrd files one at a time
for i in *.rrd
You can’t perform that action at this time.