Skip to content

Instantly share code, notes, and snippets.

View schkovich's full-sized avatar

Goran Miskovic schkovich

View GitHub Profile
@schkovich
schkovich / main.cpp
Created April 19, 2025 16:49
async_context_threadsafe_background: race in handle_sync_func_call() causes use‑after‑free on multicore
#include <Arduino.h>
#include <array>
#include <memory>
#include "pico/async_context_threadsafe_background.h"
bool core1_separate_stack = true;
volatile bool operational = false;
static constexpr int BLUE_LED = D7;
@schkovich
schkovich / upstart-nodejs
Created May 6, 2014 11:14
Upstart script to control nodejs application
# start when networking is up
start on net-device-up IFACE!=lo
# stop on shutting down the system
stop on runlevel [016]
# application environment
# staging and development instances should use override file to define environment
env NODE_ENV=production
# respawn the job up to 10 times within a 5 second period.
<?php
/**
* @see http://qafoo.com/blog/016_struct_classes_in_php.html
*/
abstract class Struct
{
/**
* Is run when reading data from inaccessible properties