Skip to content

Instantly share code, notes, and snippets.

View zckevin's full-sized avatar
🏠
Working from home

zckevin

🏠
Working from home
View GitHub Profile
@zckevin
zckevin / runtime-debug.db22c3fb5c.patch
Last active July 7, 2019 03:55
Accessing variables trapped by JavaScript closure using V8 runtime functions.
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 98aa3b98e7..2e424ead9e 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -322,18 +322,19 @@ RUNTIME_FUNCTION(Runtime_GetGeneratorScopeDetails) {
HandleScope scope(isolate);
DCHECK_EQ(2, args.length());
- if (!args[0]->IsJSGeneratorObject()) {
- return ReadOnlyRoots(isolate).undefined_value();
@zckevin
zckevin / map_gen.js
Created July 6, 2019 07:36
Generate prepack input for xxx.
var m = {}
Object.getOwnPropertyNames(window).filter(key => {
let s = window[key] && window[key].toString()
return !key.startsWith("_$") && s && s.indexOf("native code") != -1
}).map(key => {
let fn = window[key]
let ownKeys = [], protoKeys = []
if (fn) {
ownKeys = Object.getOwnPropertyNames(fn).filter(s => {
if (s === "caller" || s === "callee" || s === "arguments" || s === "constructor") return false
@zckevin
zckevin / run.sh
Created July 4, 2019 00:20
Phicomm N1 as router
#!/bin/bash
nohup /root/ssr/installed/bin/ss-local -u -c /root/shadowsocksr.json >/dev/null 2>&1 &
nohup /root/overture/overture-linux-arm64 -c /root/overture/config.json >/dev/null 2>&1 &
nohup /root/tun2socks-linux-arm64 \
-proxyType socks \
-proxyServer localhost:12345 \
-tunName tun0 \
-tunAddr 241.0.0.2 -tunGw 241.0.0.1 \
-loglevel debug \