Skip to content

Instantly share code, notes, and snippets.

View tthtlc's full-sized avatar

Peter Teoh tthtlc

View GitHub Profile
2: ~register_delegate+1(this=0x3e5e08080ddd <JSGlobal Object>, 0x3e5e087c25e5 <JSFunction _ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN20NodeTriangleCallbackD0Ev (sfi = 0x3e5e0879d1b5)>) {
2: } -> 2440
2: ~register_delegate+1(this=0x3e5e08080ddd <JSGlobal Object>, 0x3e5e087c25b1 <JSFunction _ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN20NodeTriangleCallbackD1Ev (sfi = 0x3e5e0879d17d)>) {
2: } -> 2444
2: ~register_delegate+1(this=0x3e5e08080ddd <JSGlobal Object>, 0x3e5e087c26b5 <JSFunction _ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN29QuantizedNodeTriangleCallback28internalProcessTriangleIndexEPS2_ii (sfi = 0x3e5e0879d295)>) {
2: } -> 2448
2: ~register_delegate+1(this=0x3e5e08080ddd <JSGlobal Object>, 0x3e5e087c2681 <JSFunction _ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN29QuantizedNodeTriangleCallbackD0Ev (sfi = 0x3e5e0879d25d)>) {
2: } -> 2452
2: ~register_delegate+1(t
@tthtlc
tthtlc / print-all-code
Created January 26, 2020 16:01
d8's print-all-code option
kind = BYTECODE_HANDLER
name = GetIteratorExtraWideHandler
compiler = turbofan
address = 0x4c90805a951
Trampoline (size = 1)
0x4c90805a990 0 cc int3l
Instructions (size = 160)
0x556963e3b140 0 55 push rbp
@tthtlc
tthtlc / d8tracing
Last active January 26, 2020 15:52
debugging javascript using V8's output tools
#assuming you are at V8's root directory
# https://gist.github.com/kevincennis/0cd2138c78a07412ef21
#
filelist=`ls -1 ../../test/benchmarks/data/octane/*.js`
basefile="../../test/benchmarks/data/octane/base.js"
cd "out/x64.release"
for file in $filelist
do
./d8 --trace $basefile $file
@tthtlc
tthtlc / mylora_wifi_oled
Created January 19, 2020 06:18
How to write to the OLED in WiFi Lora V2 kit from Heltec
#include <WiFi.h>
#include <U8x8lib.h>
// #include <LoRa.h>
// the OLED used
U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ 15, /* data=*/ 4, /* reset=*/ 16);
int linecounter = 0;
void myu8x8_print(const char *line) {
import sys
import subprocess
def get_children(pid):
if (len(pid)==0) or pid is None:
return
child_pid_procfs="/proc/" + pid + "/task/" + pid + "/children"
out = subprocess.Popen(['cat', child_pid_procfs],
stdout=subprocess.PIPE,
@tthtlc
tthtlc / bytenode_problem1
Last active December 28, 2019 06:41
Problems with bytenode
From:
https://hackernoon.com/how-to-compile-node-js-code-using-bytenode-11dcba856fa9
and using bytenode to compile js:
bytenode --compile jquery-3.3.1.min.js jquery-3.3.1.min.jsc
evalmachine.<anonymous>:1
(function (exports, require, module, __filename, __dirname) { ��������S
^
@tthtlc
tthtlc / sockit_bootup_dmesg.txt
Created August 25, 2019 16:51
Bootup message on SoCKit (Terasic)
U-Boot SPL 2013.01.01 (Sep 22 2014 - 15:43:31)
BOARD : Terasic SoCKit Version D Board
################################################################################
##################################= =#
########=-=#######################= -- =#
######- =#######################= ####- =###### =#
######- ###############- -=##=##= ####- ######## =#
####= =##- -### ##= -####### ###### ####- #####- - =#
#### ## ### ## -##= -=--=###= ####==# ####- #### =#
######- ###- ##- -### =####= =====###= ####- #### #### =#
@tthtlc
tthtlc / mobsf_startup
Created August 14, 2019 06:25
Mobile Security Framework starting up
bash ./mydocker_mobile_secure.sh
[INFO] Loading User config from: /root/.MobSF/config.py
__ __ _ ____ _____ _ ___
| \/ | ___ | |__/ ___|| ___| __ _/ | / _ \
| |\/| |/ _ \| '_ \___ \| |_ \ \ / / || | | |
| | | | (_) | |_) |__) | _| \ V /| || |_| |
|_| |_|\___/|_.__/____/|_| \_/ |_(_)___/
!SESSION 2019-08-10 13:50:09.972 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_131
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -application com.ifx.davex.product.daveApplication -showlocation
Command-line arguments: -os win32 -ws win32 -arch x86_64 -application com.ifx.davex.product.daveApplication -showlocation
!ENTRY org.eclipse.equinox.ds 2 0 2019-08-10 13:50:40.886
!MESSAGE [SCR - WorkThread] Timeout occurred! Thread was blocked on processing [QueuedJob] WorkPerformer: org.eclipse.equinox.internal.ds.SCRManager@70f5c10d; actionType 1
@tthtlc
tthtlc / compilation of blinky example for ICE40 HX8K example
Last active August 1, 2019 23:55
compilation of blinky example for ICE40 HX8K example
Download the git repository:
https://github.com/nesl/ice40_examples
and then go to "blinky" subdirectory:
make
# if build folder doesn't exist, create it
mkdir -p ./build