Skip to content

Instantly share code, notes, and snippets.


Simon/Jinyu Liu passos

View GitHub Profile
adolli / 如何使用python3逃逸沙箱,获得进程上下文权限提升.md
Last active Nov 28, 2020
View 如何使用python3逃逸沙箱,获得进程上下文权限提升.md




OJ(Online judge, 在线编程测评提交代码到后台运行检查)网站一般都允许各种各样的代码提交,其中很有可能包含python3,于是决定尝试通过python3的代码执行,进行沙箱逃逸,以及绕过各种限制。


rajatdiptabiswas / Binary Indexed
Last active Nov 22, 2020
Implementation of Binary Indexed Tree/Fenwick Tree in Python
View Binary Indexed
#!/usr/bin/env python3
Binary Indexed Tree / Fenwick Tree
alswl / hosts
Last active Feb 17, 2021
(deprecated, I bought xiaomi VIP)hosts for OpenWRT, for disable AD in xiaomi TV
View hosts
gaearon / slim-redux.js
Last active Feb 10, 2021
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
View slim-redux.js
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
Kartones /
Last active Feb 23, 2021
PostgreSQL command line cheatsheet


Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
chaitanyagupta /
Last active Feb 17, 2021
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. do their work at read-time.

wbroek / genymotionwithplay.txt
Last active Feb 8, 2021
Genymotion with Google Play Services for ARM
View genymotionwithplay.txt
NOTE: Easier way is the X86 way, described on
Download the following ZIPs:
ARM Translation Installer v1.1 (
Download the correct GApps for your Android version:
Google Apps for Android 6.0 ( -
Google Apps for Android 5.1 ( -
Google Apps for Android 5.0 ( -
raven / Breakpoints_v2.xcbkptlist
Last active Aug 30, 2019
Symbolic breakpoint for dynamically linking libReveal against UIApplicationMain
View Breakpoints_v2.xcbkptlist
<?xml version="1.0" encoding="UTF-8"?>
type = "2"
version = "2.0">
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
shouldBeEnabled = "Yes"
ignoreCount = "0"
BlakeGardner / Install
Last active Nov 5, 2020
Install HTTPie Mac OS X
View Install

This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip. An installed copy of Homebrew is a prerequisite.


The easy way

brew install httpie
lg0 / gist:3481797
Last active Oct 9, 2015
解决 OSX 上原生 VPN (Cisco IPSec)每隔一小时要求输入密码的情况
View gist:3481797

解决方案来自:[Apple Support Communities] (

  1. 连接 VPN Cisco IPSec (让系统生成配置文件)
  2. 拷贝配置文件到/etc/racoon打开终端执行:
    $ sudo cp /var/run/racoon/ /etc/racoon
  3. 修改 racoon 配置文件:
    $ sudo vim /etc/racoon/racoon.conf
  4. 将最后一行注释掉(目的是不使用系统生成配置):
    # include "/var/run/racoon/*.conf" ;
  5. 将下面一行添加到文件末尾,包含分号(使用定制的配置文件):