Skip to content

Instantly share code, notes, and snippets.

View dropmeaword's full-sized avatar

Luis Rodil-Fernandez dropmeaword

  • Amsterdam, Netherlands
View GitHub Profile
@dropmeaword
dropmeaword / no-crisis.js
Last active December 25, 2015 00:39
The No-Crisis Greasemonkey user script.
// ==UserScript==
// @name NoCrisis
// @namespace spinningkid.info
// @description the best way to deal with an economic crisis is to ignore it
// @include *
// @version 0.0.1
// ==/UserScript==
var noCrisisWords = [
"crisis",
@dropmeaword
dropmeaword / userscript-cleanfb.js
Created October 22, 2013 12:39
Remove advertisements from facebook
// ==UserScript==
// @name Facebook Cleaner
// @author Luis Rodil-Fernandez
// @description Cleans stupid shit from facebook
// @include http://www.facebook.com/*
// @include https://www.facebook.com/*
// @grant none
// ==/UserScript==
function wipeFuckingAds() {
@dropmeaword
dropmeaword / git branch name prompt
Created December 20, 2013 18:01
function parse_git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } YELLOW="\[\033[0;33m\]" # Comment in the above and uncomment this below for a color prompt PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w$YELLOW\$(parse_git_branch)\[\033[00m\]\$ "
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
YELLOW="\[\033[0;33m\]"
# Comment in the above and uncomment this below for a color prompt
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w$YELLOW\$(parse_git_branch)\[\033[00m\]\$ "
SynthDef(\Out, { arg hey;
Out.ar([0, 1], SoundIn.ar(0));
}).add;
Synth(\Out);
NetAddr.langPort;
SynthDef(\Bing, { arg what, freq = 400;
var env, sin;
#!/usr/bin/env python
# -*- coding: ascii -*-
import sys, os
import string
"""
Get the system's measurement of the entropy pool in bits.
:copyright: 2014 by Luis Rodil-Fernandez
:license: MIT, see LICENSE for more details
@dropmeaword
dropmeaword / starshapedPlayer
Created July 16, 2014 14:57
OF aplication to play three videos in a star shaped arrangement
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(255,255,255);
ofSetVerticalSync(true);
frameByframe = false;
ofLogLevel(OF_LOG_VERBOSE);
@dropmeaword
dropmeaword / arduino_AT
Last active August 29, 2015 14:04
Configure XBee from Arduino
boolean configured;
String AT_OK = "OK\r"; // radio module is ready.
boolean xbee_expect_ok() {
// check that we get back OK from the radio module
String response = String("");
while (response.length() < AT_OK.length()) {
if (Serial.available() > 0) {
response += (char) Serial.read();
}
#!/usr/bin/env python
#
# Copyright (c) 2011 Yubico AB
# See the file COPYING for licence statement.
#
"""
Get random data from TRNG on YubiHSM and insert it into host
entropy pool. Probably only works on Linux since the ioctl()
request value RNDADDENTROPY seems Linux specific.
"""
@dropmeaword
dropmeaword / connect-to-ssid
Created September 23, 2014 16:06
Connect to a given SSID on Windows 7 froma script
netsh wlan connect name=SSID-NAME
@dropmeaword
dropmeaword / phoneprobe
Last active August 29, 2015 14:08
Filter probe requests
#!/usr/bin/env python
import argparse
from multiprocessing import Process
import subprocess
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
import signal
import threading
import os, platform