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")
xLBD.c();
else window.onload = xLBD.c;
@wlach
wlach / get-gtfs-date-range.py
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)
View get-gtfs-date-range.py
#!/usr/bin/python
import os
import sys
from codecs import iterdecode
from zipfile import ZipFile
import csv
import datetime
if len(sys.argv) < 2:
@mccutchen
mccutchen / HOST-remote_app
Created Jan 17, 2012
Hacky remote TextMate setup for bitly VMs
View HOST-remote_app
#!/bin/sh
app=$1
shift;
open -a $app $@
@mccutchen
mccutchen / HOST remote_app
Created Nov 15, 2012
Hacky remote editor setup for bitly VMs
View HOST remote_app
#!/bin/sh
app=$1
shift;
open -a $app $@
@tmcw
tmcw / index.html
Created Dec 14, 2012
Unknown Pleasures
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title></title>
<style>
body {
background:#000;
font: 10px sans-serif;
width:960px;
margin:0 auto;
@rasschaert
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
#!/bin/bash
echo 'Downloading pre-built binaries'
wget https://s3.amazonaws.com/bitly-downloads/nsq/nsq-0.2.24.linux-amd64.go1.2.tar.gz
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
mbostock / .block
Last active Feb 9, 2016 — forked from dchud/README.md
Streams
View .block
license: gpl-3.0
@kr
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
https://medium.com/several-people-are-coding
Video: Zane Lackey - Building a Modern Security Organization
https://duo.com/blog/duo-tech-talk-building-a-modern-security-engineering-organization
Krebs on Security Blog
https://www.krebsonsecurity.com
Sony Breach
View ssh.rb
#!/usr/bin/env ruby
# Inspired by http://jeffmiller.github.com/2011/01/10/ssh-host-color
# == 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 Terminal.app's background colour to that colour.
# 5) Change the colour back when SSH exits.