Skip to content

Instantly share code, notes, and snippets.

View Facebook Lookback Downloader
var xLBD = {};
xLBD.c = function (){
xLBD.f = unescape(document.querySelector("[flashvars]").getAttribute("flashvars")).substring(7);
xLBD.f = JSON.parse(xLBD.f.substring(0, xLBD.f.lastIndexOf("}") + 1)).video_data[0].hd_src;
xLBD.a = "<div style='position:absolute;top:100px;height:300px;left:15%;background:#fff;border:10px solid #000;font-size:5em;padding:100px;'>Click <a download='lookback.mp4' href='"+xLBD.f+"'>here<\/a> to download your lookBack video.</div>";
document.body.innerHTML += xLBD.a;
if(document.readyState == "complete")
else window.onload = xLBD.c;
wlach /
Created May 9, 2011
Simple and stupid python script to get the range of dates covered by its service periods (useful for telling if a feed is way out of date, or will be soon)
import os
import sys
from codecs import iterdecode
from zipfile import ZipFile
import csv
import datetime
if len(sys.argv) < 2:
mccutchen / HOST-remote_app
Created Jan 17, 2012
Hacky remote TextMate setup for bitly VMs
View HOST-remote_app
open -a $app $@
mccutchen / HOST remote_app
Created Nov 15, 2012
Hacky remote editor setup for bitly VMs
View HOST remote_app
open -a $app $@
tmcw / index.html
Created Dec 14, 2012
Unknown Pleasures
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
body {
font: 10px sans-serif;
margin:0 auto;
rasschaert / nsq-0.2.24.linux-amd64.go1.2.tar.gz-to-rpm.bash
Last active Jan 3, 2016
Creates an RPM package for NSQ (distributed messaging platform written in Golang). Tested on CentOS 6 x86_64 with EPEL and Golang 1.2.
View nsq-0.2.24.linux-amd64.go1.2.tar.gz-to-rpm.bash
echo 'Downloading pre-built binaries'
echo 'Extracting archive'
tar xzf nsq-0.2.24.linux-amd64.go1.2.tar.gz
echo 'Creating correct directory structure'
mkdir -p nsq-0.2.24.linux-amd64.go1.2/usr/local/
mv nsq-0.2.24.linux-amd64.go1.2/{bin,share} nsq-0.2.24.linux-amd64.go1.2/usr/local/
mbostock / .block
Last active Feb 9, 2016 — forked from dchud/
View .block
license: gpl-3.0
kr / pre-commit
Last active Nov 11, 2016
Here's a goimports git pre-commit hook.Put this file in .git/hooks.
View pre-commit
#!/usr/bin/env bash
# Redirect output to stderr.
exec 1>&2
# list staged go files
# ignore trees starting with "_", like the go tool
lsgo() {
git ls-files|egrep '.*[.]go$'|fgrep -v /_
View gist:6d8fc3fd0d67b6470f7d
Blog post: Ryan Huber - Distributed Security Alerting
Video: Zane Lackey - Building a Modern Security Organization
Krebs on Security Blog
Sony Breach
View ssh.rb
#!/usr/bin/env ruby
# Inspired by
# == What this version does:
# 1) Launch an SSH process
# 2) Grab the IP that SSH connected to
# 3) Hash that IP and generate a colour from it
# 4) Change's background colour to that colour.
# 5) Change the colour back when SSH exits.