Skip to content

Instantly share code, notes, and snippets.

Robin Moffatt rmoff

Block or report user

Report or block rmoff

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
WheresAlice / Makefile
Last active Sep 30, 2019
Produce a CSV with Tiploc code, Longitude, and Latitude using Naptan data
View Makefile
.DEFAULT_GOAL := tiploc_locations.csv
wget -O
unzip -o
tiploc_locations.csv: Stops.csv

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

pirate /
Last active Feb 9, 2020
Script to manage searching, backing up, and collecting infinite clipboard history from the Alfred Clipboard History on macOS.
#!/usr/bin/env bash
# This is a script that provides infinite history to get around Alfred's 3-month limit.
# It works by regularly backing up and appending the items in the alfred db to a
# sqlite database in the user's home folder. It also provides search functionality.
# Example Usage:
# backup
joel-hamill /
Last active Jun 28, 2019
Build Confluent Platform manually
  1. Clone ce-kafka checkout 5.3.x and build

    gradle && ./gradlew jar

  2. Start ZK in ce-kafka repo

    ./bin/ config/

  3. Start Kafka (change logs to /tmp) in ce-kafka repo

jpzk / easy-schema-registry.txt
Created Nov 30, 2018
Easy way to delete schemas in the schema registry
View easy-schema-registry.txt
apt install peco
apt install curl
curl http://localhost:8081/subjects | jq .[] | tr -d "\"" | peco | xargs -I '{}' curl -v -X DELETE http://localhost:8081/subjects/'{}'
T-Rave /
Last active Aug 26, 2019
Alfred, Mac OS X app, full clipboard dump to text file
## Must have sqlite3 installed. Homebrew user? brew install sqlite
## Can be ran directly in command line and will place file directory where ran
## Remove `-header` if you don't want the output to have the column name `item`
## Checkout more options and Workflow -
# dumps output with list option since single column. Produces cleaner data without double quotes
sqlite3 -header -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard;" > clipboard-dump.txt
# dumps full table to csv format
sqlite3 -header -csv ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT * FROM clipboard;" > clipboard-dump.csv
# dumps only items in descending (inverse) order with no column name
sqlite3 -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard ORDER BY item DESC;" > clipdump.txt
LoranKloeze /
Last active Dec 3, 2019
Special for OSX: this script grabs 802.11 probe requests from the air and puts them on your screen or in a sqlite3-db
#!/usr/bin/env python2.7
# 802.11 probe requests processor
# Copyright (C) 2017 Ralon cybersecurity
# Loran Kloeze - - @lorankloeze
# MIT license: do with it what you want but use it for good
# Tested on OS X El Capitan 10.11.6 - MacBook Air
# This script grabs probe requests from the air and outputs them on the screen
# and/or saves them to a sqlite3-db.
markharwood / LoadMOTs
Created Aug 11, 2014
Script to load and geocode MOT data
View LoadMOTs
import gzip
import csv
from elasticsearch import helpers
from elasticsearch.client import Elasticsearch
import time
csv.register_dialect('piper', delimiter='|', quoting=csv.QUOTE_NONE)
# See
mmaassen / weblogic-shipper.conf
Last active May 11, 2019
LogStash (1.2.2) WebLogic Server shipper
View weblogic-shipper.conf
input {
## WebLogic Server Log
file {
type => "weblogic"
path => [ "/var/log/weblogic/domain/managedserver.log" ]
codec => multiline {
pattern => "^####"
negate => true
what => previous
rmoff / .screenrc
Last active Dec 15, 2015
View .screenrc
hardstatus alwayslastline "%{= RY}%H %{kG}%{G} Screen(s): %{c}%w %=%{kG}%c %D, %M %d %Y LD:%l"
startup_message off
msgwait 1
defscrollback 100000
nethack on
You can’t perform that action at this time.