Skip to content

Instantly share code, notes, and snippets.

Roman Valls Guimera brainstorm

Block or report user

Report or block brainstorm

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

Trying to deploy WPA3 on my home network


Recently, news broke about a new possible offline attack on WPA2 using PMKID. To summarize the attack, WPA2 protected APs can end up broadcasting PMKID values which can then be used to offline-brute-force the password.

These PMKID values are computed this way:

marcan /
Last active May 22, 2019
Linux kernel initialization, translated to bash
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
dannguyen /
Last active Jun 28, 2018
Transcribing ProPublica podcast with Python and Watson Speech to Text API

Using IBM Watson Speech to Text API to translate a ProPublica podcast

An example of using the Watson Speech to Text API to translate a podcast from ProPublica: How a Reporter Pierced the Hype Behind Theranos

This is just a simpler demo of the same technique I demonstrate to make automated video supercuts in this repo:

The transcription takes just a few minutes (less if you parallelize the requests to IBM) and is free...but it isn't perfect by any means. It doesn't fare super well on proper nouns:

  • Charles Ornstein's last name is transcribed as Orenstein
  • John Carreyrou's last name becomes John Kerry Roo
deckar01 /
Last active Nov 26, 2015
Rooting the Transcend WiFi SD card by injecting commands into the wifi channel config

Other languages:

Rooting the Transcend WiFi SD card

by injecting commands into the wifi channel config


This exploit requires opening the "Files" page of the card's web interface and escaping to the root of the file system.


Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

View gist:10130454
#!/usr/bin/env python
# Quick and dirty demonstration of CVE-2014-0160 by
# Jared Stafford (
# Modified so that it finds cookies
import sys
import struct
import socket
import time
import select
debasishg / gist:8172796
Last active Sep 18, 2019
A collection of links for streaming algorithms and data structures
View gist:8172796
  1. General Background and Overview
hatt / logstash-elasticache.pp
Last active Mar 13, 2017
Dynamically scoping Redis with AWS Elasticache to use the local availability zone. Batch writing is used for the shipper to reduce usage costs.
View logstash-elasticache.pp
$redis_host = $::ec2_placement_availability_zone ? {
'us-west-1a' => 'logging-redis-a.<redacted>',
'us-west-1b' => 'logging-redis-b.<redacted>'
logstash::output::redis { 'redis-shipper':
batch => true,
host => $redis_host,
key => 'logstash',
data_type => 'list'
aras-p / preprocessor_fun.h
Last active Sep 16, 2019
Things to commit just before leaving your job
View preprocessor_fun.h
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
athoune / gist:5777474
Last active Aug 28, 2018
Pushing mails to Elastic Search for a Kibana analysis.
View gist:5777474
#!/usr/bin/env python
import sys
# Lamson is an application, but also the best way to read email without
# struggling with "battery include" libraries.
from lamson.encoding import from_string as parse_mail
from pyelasticsearch import ElasticSearch
from pyelasticsearch.exceptions import ElasticHttpNotFoundError
You can’t perform that action at this time.