Skip to content

Instantly share code, notes, and snippets.

View pfalcon's full-sized avatar

Paul Sokolovsky pfalcon

View GitHub Profile
@pfalcon
pfalcon / merge-mongoose-hist.sh
Last active August 7, 2017 21:55
A script to merge original mongoose commit history into civetweb repo.
#!/bin/sh
set -xe
# Anti-GPL paranoid delight: make it possible to swear on bible that
# no GPL commit ever entered civetweb repo
function prepare_mongoose_mit () {
git clone https://github.com/cesanta/mongoose
cd mongoose
# Civetweb started from this rev. There're couple more MIT-licensed
# commits in upstream repo
git reset --hard a0b43ae8e0a09d8ac3f7932de19f66b2677dafd2
@pfalcon
pfalcon / merge-mongoose-hist-bugreport.sh
Last active December 24, 2015 03:19
Testcase to reproduce error when rebasing a commit w/o textual changes, with chmod changes only
#!/bin/sh
set -xe
function prepare_mongoose_mit () {
git clone https://github.com/cesanta/mongoose
cd mongoose
# Civetweb started from this rev. There're couple more MIT-licensed
# commits in upstream repo
git reset --hard a0b43ae8e0a09d8ac3f7932de19f66b2677dafd2
git gc
cd ..
@pfalcon
pfalcon / README.md
Created October 2, 2013 22:34 — forked from sarg/README.md

Obtaining RK3066 boot ROM.

Here are my steps.

At first, I took a look to RK30xxLoader(L)_V1.18.bin. This file appears in update.img for my device. So, I unpacked update.img using rk29Kitchen.

strings on that file returns nothing interesting, so I assumed the file is crypted

@pfalcon
pfalcon / gist:8785113
Created February 3, 2014 14:48
MicroPython - cstruct example
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include "nlr.h"
#include "misc.h"
#include "mpconfig.h"
#include "mpqstr.h"
#include "obj.h"
diff --git a/include/net/yaip/net_ip.h b/include/net/yaip/net_ip.h
index e131d0b..bc98888 100644
--- a/include/net/yaip/net_ip.h
+++ b/include/net/yaip/net_ip.h
@@ -265,7 +265,10 @@ struct net_udp_hdr {
struct net_tcp_hdr {
uint16_t src_port;
uint16_t dst_port;
+ union {
uint8_t seq[4];
@pfalcon
pfalcon / gist:d3d4d5f410ceda2b5b32f1b1c7c3a426
Created December 1, 2018 16:38
Philosophy of OpenSource
https://13brane.net/rants/de-facto-closed-source/
@pfalcon
pfalcon / gist:d3bb09698beff553a7727adddb1a68dd
Last active December 22, 2018 09:02
Python bytecode and related meta stuff
2003-01-13 pyvm2.py: https://mail.python.org/pipermail/pypy-dev/2003-January/000048.html
2013-01-13 - 2016 byterun: https://github.com/nedbat/byterun - A Python implementation of a Python bytecode runner.
Based on pyvm2.py
* https://nedbatchelder.com/blog/201301/byterun_and_making_cells.html
http://www.aosabook.org/en/500L/a-python-interpreter-written-in-python.html
https://www.slideshare.net/akaptur/byterun-a-python-bytecode-interpreter-at-nycpython
https://www.synopsys.com/blogs/software-security/understanding-python-bytecode/