Skip to content

Instantly share code, notes, and snippets.

@aguslr
aguslr / README.md
Last active December 20, 2015 00:19
Grub2 loopback multiboot pen drive to boot from ISO
@pklaus
pklaus / bird6.conf
Created December 17, 2012 01:38
A configuration file for the bird routing daemon being set up to work with OSPFv3 (the IPv6 variant).
log syslog all;
router id 0.0.0.159;
# Turn on global debugging of all protocols
debug protocols all;
# Define a route filter...
# filter test_filter {
# if net ~ 10.0.0.0/16 then accept;
@hillar
hillar / molo2midi.js
Last active May 13, 2016 08:21
moloch sessions to midi
// ES6
/*
moloch sessions.csv field names
[ 'Protocol',
' First Packet',
' Last Packet',
' Source IP',
@bonsaiviking
bonsaiviking / gist:3077294
Created July 9, 2012 15:53
Nmap's dns-zone-transfer meets zonetransfer.me
$ nmap --script dns-zone-transfer --script-args dns-zone-transfer.domain=zonetransfer.me -p 53 -Pn $(dig +short zonetransfer.me NS | head -1)
Starting Nmap 6.02 ( http://nmap.org ) at 2012-07-09 10:50 CDT
Nmap scan report for ns12.zoneedit.com. (209.62.64.46)
Host is up (0.033s latency).
rDNS record for 209.62.64.46: ns12.zoneedit.com
PORT STATE SERVICE
53/tcp open domain
| dns-zone-transfer:
| zonetransfer.me. SOA ns16.zoneedit.com. soacontact.zoneedit.com.
@tzbob
tzbob / uhosts.scala
Created November 7, 2013 23:20
automatically update pdnsd.adblock
#!/usr/bin/env scala
import scala.io.Source
import java.io.FileWriter
import java.util.Calendar
import scala.util.matching.Regex
val resources = List(
Resource("http://someonewhocares.org/hosts/hosts"),
Resource(
@m-ou-se
m-ou-se / test.cpp
Created April 9, 2013 12:55
Ugly hacky code-duplication finder.
#include <iostream>
#include <fstream>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
struct line {
std::string file;
size_t line_number;
@eyecatchup
eyecatchup / secure_flashing_mako_lrx21t
Created November 22, 2014 13:06
The safest way to flash factory images - This is a manual step-by-step procedure to flash Android 5.0 (LRX21T) factory images onto the Nexus 4 (aka mako).
# Create a new working directory and cd into it
~$ mkdir -p /path/n4update && cd /path/n4update
# Download all files you need
/path/n4update$ wget --no-check-certificates https://dl.google.com/dl/android/aosp/occam-lrx21t-factory-51cee750.tgz
# Download openrecovery-twrp-2.8.2.0-mako.img from http://techerrata.com/browse/twrp2/mako to the same path
# Download CF-Auto-Root-mako-occam-nexus4.zip from http://autoroot.chainfire.eu to the same path
# Extract downloaded file archives
/path/n4update$ mkdir -p ./images && tar zxvf occam-lrx21t-factory-51cee750.tgz -C ./images
def clean_tweets(self, df):
"""
Takes raw tweets and cleans them
so we can carry out analysis
remove stopwords, punctuation,
lower case, html, emoticons.
This will be done using Regex
? means option so colou?r matches
both color and colour.
@DFoly
DFoly / part1_Twitter.py
Last active October 31, 2018 10:00
Part 1 Twitter Blog Post
#!usr/bin/python
import mysql.connector
from mysql.connector import Error
import tweepy
import json
from dateutil import parser
import time
import os
import subprocess