Skip to content

Instantly share code, notes, and snippets.

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
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;
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
#include <ucontext.h>
ucontext_t ctx;
int
main(void)
{
getcontext(&ctx);
if (ctx.uc_mcontext.mc_magic != 0xc0ffee)
printf("Wot\n");
@keesj
keesj / drawfail.sh
Created March 5, 2011 12:13
using RANDOM + MOD is not a good Random nummber generator
# 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

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

/* 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);
@keesj
keesj / Stepper.ino
Last active January 18, 2023 10:27
28BYJ-48 Stepper esp8266 (Pins D5,D6,D7,D8)
// 28BYJ-48 Stepper esp8266
// Steps for stepping and performing 1/2 steps
char steps[8] =
{
0x01,// 1
0x03,// 12
0x02,// 2
0x06,// 23
@keesj
keesj / install-qgis-ltr-ubuntu.sh
Last active December 12, 2023 13:38
Install the LTR version of QGiS on ubuntu
# It happend again the instruction for installing gqis are very hard to understand
# To much formation and half baked scripts and instructions.
# In my experience .. the people using qgis are not the root/vi type of people
# hence the instructions on that page do not work
# In a similar way they do not work for me becasue TLDR. I want clear
# instructions on doing stuff and specially choosing how to install
# longer term release is .. bad.
# https://www.qgis.org/nl/site/forusers/alldownloads.html#debian-ubuntu
set -x
@keesj
keesj / gist:fe9004f205b92f2a2419cc0eb5ad2a7e
Created February 26, 2024 15:19
verilog / iverilog return value from vpi
# include <vpi_user.h>
static int rnginit_compiletf(char*user_data __attribute__((unused)))
{
return 0;
}
static int rnginit_calltf(char*user_data __attribute__((unused)))
{
vpiHandle callh;