Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am thatisgeek on github.
  • I am thatisgeek (https://keybase.io/thatisgeek) on keybase.
  • I have a public key ASCYA52c6tU-i-CgiaWKfQ2nl7nq61MBqxvqXsqtxYcHRQo

To claim this, I am signing this object:

@ThatIsGeek
ThatIsGeek / decrap.js
Created April 20, 2017 16:10
Cloudflare Email Encraption
function decrap(enc) {
var email = '';
//first byte is the key for XOR in hex
//we convert it to number by OR with 0
var key = ('0x' + enc.substr(0,2)) | 0;
//subsequent bytes are the ciphertext
//in hex format
for (n=2; n < enc.length; n+= 2) {
@ThatIsGeek
ThatIsGeek / curl_based_downloader.cc
Last active February 17, 2017 09:25
C++ cURL downloader
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <sstream>
#include <sys/stat.h>
@ThatIsGeek
ThatIsGeek / cpp_duck_typing.cpp
Created February 7, 2016 21:43
C++ duck typing
#include <memory>
#include <iostream>
#include <vector>
struct A {
void draw() {
std::cout << "A!!!" << std::endl;
}
};