Skip to content

Instantly share code, notes, and snippets.

View rmoff's full-sized avatar
:shipit:
Shitposting and Memes

Robin Moffatt rmoff

:shipit:
Shitposting and Memes
View GitHub Profile
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@fetep
fetep / genhttplogs.rb
Created March 14, 2012 15:32
apache log generator
#!/usr/bin/ruby
class IPGenerator
public
def initialize(session_count, session_length)
@session_count = session_count
@session_length = session_length
@sessions = {}
end
@rmoff
rmoff / .screenrc
Last active December 15, 2015 12:58
.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
@mmaassen
mmaassen / weblogic-shipper.conf
Last active May 11, 2019 16:31
LogStash (1.2.2) WebLogic Server shipper
input {
## WebLogic Server Log
file {
type => "weblogic"
path => [ "/var/log/weblogic/domain/managedserver.log" ]
codec => multiline {
pattern => "^####"
negate => true
what => previous
}
@kaipakartik
kaipakartik / tree.go
Created December 25, 2013 07:00
Exercise: Equivalent Binary Trees
package main
import (
"code.google.com/p/go-tour/tree"
"fmt"
)
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {
@markharwood
markharwood / LoadMOTs
Created August 11, 2014 10:13
Script to load and geocode MOT data
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 http://postcodepal.com/dbgen/postcode_areas_true-centroids.zip
pf=open('/Users/Mark/Documents/work/irdata/MOT/postcode_areas.csv')
@LoranKloeze
LoranKloeze / probe_requests_OSX_to_screen_or_sqlite3.py
Last active July 8, 2020 14:33
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 - loran@ralon.nl - @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.
@T-Rave
T-Rave / alfred-clipboard-dump.sh
Last active June 1, 2023 20:53
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 - https://github.com/T-Rave/alfred-clipboard-dump
# 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
@jpzk
jpzk / easy-schema-registry.txt
Created November 30, 2018 11:25
Easy way to delete schemas in the schema registry
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/'{}'
@joel-hamill
joel-hamill / testc3.md
Last active June 28, 2019 17:49
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/zookeeper-server-start.sh config/zookeeper.properties

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