Skip to content

Instantly share code, notes, and snippets.

View frida-shell-cmd.js
/* Execute a shell command and capture stdout until eof (run with node frida-shell-cmd.js) */
const frida = require('frida');
let device = null;
async function main() {
const deviceManager = frida.getDeviceManager();
device = await deviceManager.addRemoteDevice('192.168.3.105');
device.output.connect(onOutput);
View qgis_install.md

Installation on Ubuntu of qgis

On the latest Ubuntu long term support release (20.04) the LTR long term support version of qgis 3.10 was added. If you are a company looking for long term version of gqis installing qgis from the default ubuntu repositories might not be such a bad idea.

If however you want to install a more recent version of qgis (either latest release or a more up to date LTR version) or possibly are using an older ubuntu version you will need to install qgis from the official qgis repositories.

For smal teams / people happy doing software updated we recommend using the latest version (3.12.x) and this is what this quide will help you doing.

Dependencies

@keesj
keesj / Stepper.ino
Last active May 7, 2019
28BYJ-48 Stepper esp8266 (Pins D5,D6,D7,D8)
View Stepper.ino
// 28BYJ-48 Stepper esp8266
// Steps for stepping and performing 1/2 steps
char steps[8] =
{
0x01,// 1
0x03,// 12
0x02,// 2
0x06,// 23
View gist:9805344
#include <ucontext.h>
ucontext_t ctx;
int
main(void)
{
getcontext(&ctx);
if (ctx.uc_mcontext.mc_magic != 0xc0ffee)
printf("Wot\n");
View gist:9805273
0804ea70 <_getcontext>:
804ea70:>......8b 54 24 04 >..mov 0x4(%esp),%edx
804ea74:>......83 fa 00 >..cmp $0x0,%edx
804ea77:>......75 0f >..jne 804ea88 <_getcontext+0x18>
804ea79:>......e8 52 05 00 00 >..call 804efd0 <__errno>
804ea7e:>......c7 00 0e 00 00 00 >..movl $0xe,(%eax)
804ea84:>......31 c0 >..xor %eax,%eax
804ea86:>......48 >..dec %eax
804ea87:>......c3 >..ret....
804ea88:>......8b 02 >..mov (%edx),%eax
View gist:9779949
ddekit_thread_t *th =
(ddekit_thread_t *) ddekit_simple_malloc(sizeof(ddekit_thread_t));
memset(th,0,sizeof(ddekit_thread_t));
strncpy(th->name, name, DDEKIT_THREAD_NAMELEN);
th->name[DDEKIT_THREAD_NAMELEN-1] = 0;
th->stack = ddekit_large_malloc(DDEKIT_THREAD_STACKSIZE);
th->arg = arg;
th->fun = fun;
View gist:9741553
040067f0 <setcontext>:
40067f0:>......8b 54 24 04 >..mov 0x4(%esp),%edx
40067f4:>......83 fa 00 >..cmp $0x0,%edx
40067f7:>......75 12 >..jne 400680b <setcontext+0x1b>
40067f9:>......ba 0e 00 00 00 >..mov $0xe,%edx
40067fe:>......52 >..push %edx
40067ff:>......e8 ec 04 00 00 >..call 4006cf0 <__errno>
4006804:>......5a >..pop %edx
4006805:>......89 10 >..mov %edx,(%eax)
4006807:>......31 c0 >..xor %eax,%eax
@keesj
keesj / drawfail.sh
Created Mar 5, 2011
using RANDOM + MOD is not a good Random nummber generator
View drawfail.sh
# Prove using RANDOM + MOD is not a good Random nummber generator
#
# CATEGORIES == the amount of "winners" in the experiment
# @author freakingtux
CATEGORIES=707
EXPERIMENTS=100000
if ! which gnuplot 2>&1 > /dev/null
then