Skip to content

Instantly share code, notes, and snippets.

View jchen8tw's full-sized avatar

Justin Chen jchen8tw

View GitHub Profile
@jchen8tw
jchen8tw / pickle-payload.py
Created December 15, 2019 04:37 — forked from mgeeky/pickle-payload.py
Python's Pickle Remote Code Execution payload template.
#!/usr/bin/python
#
# Pickle deserialization RCE payload.
# To be invoked with command to execute at it's first parameter.
# Otherwise, the default one will be used.
#
import cPickle
import sys
import base64
@jchen8tw
jchen8tw / lirc-pi3.txt
Created April 14, 2019 08:16 — forked from prasanthj/lirc-pi3.txt
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
@jchen8tw
jchen8tw / treap.cpp
Last active November 20, 2018 15:23
simple treap implementation
#include<iostream>
using namespace std;
struct node{
node():data(0),left(0),right(0){}
int data;
node *left,*right;
//node* trace;
};
//dummy node
node* root = new node;