Skip to content

Instantly share code, notes, and snippets.

import math
import matplotlib.pyplot as plt
timestamps = []
xs = []
ys = []
sample_rate = 4 # 10ms
x_begin = x_end = 0x285
@happyjake
happyjake / App.lua
Last active December 1, 2017 05:49
use hammerspoon to quick add current page link to evernote
local apps = {}
-- App-specific code, runs when you launch or switch to another app
local App = {}
App.new = function(name)
log.d('new App for ',name)
local self = {}
self.name = name
self.bindings = {}
@happyjake
happyjake / whatsapp_phone_enumerator_floated_div.js
Created May 13, 2017 06:25
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses (floated div)
/*
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses
Floated div edition
01-05-2017
(c) 2017 - Loran Kloeze - loran@ralon.nl
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds
of information from a range of phonenumbers. It doesn't matter if these numbers are part
of your contact list. At the end a table is displayed containing phonenumbers, profile pics,
about texts and online statuses. The online statuses are being updated every
"
" how to install
"
" git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
" vim +BundleInstall +qall
"
set nocompatible
" vundle {
filetype off
@happyjake
happyjake / mybase64.cc
Created September 4, 2012 17:12
c++ base64
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
static char encoding_table[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
@happyjake
happyjake / WeChat.cc
Created September 4, 2012 17:10
node_addon util
void GetArgAsStdString(const Arguments& args, int n, std::string& str) {
Local<String> inbuf_str = args[n].As<String>();
str.resize(inbuf_str->Utf8Length());
inbuf_str->WriteUtf8((char *) &(str[0]));
}
bool GetObjValAsUInteger(Handle<Object> obj, const char *key, size_t& uintVal) {
Local<String> k = String::New(key);
if (!obj->Has(k)) {
return false;