Skip to content

Instantly share code, notes, and snippets.


Tom Vijlbrief tomtor

View GitHub Profile
tomtor / stm32_sleep.ino
Last active May 16, 2020
stm32 low power sleep code
View stm32_sleep.ino
#include <libmaple/pwr.h>
#include <libmaple/scb.h>
#include <RTClock.h>
// Define the Base address of the RTC registers (battery backed up CMOS Ram), so we can use them for config of touch screen or whatever.
// See for a more details about the RTC NVRam
// 10x 16 bit registers are available on the STM32F103CXXX more on the higher density device.
#define BKP_REG_BASE ((uint32_t *)(0x40006C00 + 0x04))
View epsg28992.sql
-- CRS conversion functions for GeoJSON coordinates and lat/long pairs
-- in PostgreSQL/PostGIS:
-- from (Google) Web Mercator (OpenLayers:900913, EPSG:3785 and EPSG:3857 (prefered))
-- and WGS-84 Lat (y) Long (x) (EPSG:4326)
-- to EPSG:28992 (RD new)
-- Needs the PostGIS extension (surprise ;-)
View json-func.sql
-- See
-- All credits to the original author
CREATE OR REPLACE FUNCTION "json_object_set_key"(
"json" json,
"key_to_set" TEXT,
"value_to_set" anyelement
tomtor / MendixWidgetWrapper.html
Created May 26, 2016
A simple Wrapper for Mendix Widgets
View MendixWidgetWrapper.html
<script src="../lib/jquery-1-11-3.js"></script>
function declare_f(w, a, p) {
p.domNode= $('body')[0];
p._contextObj= { set: function(k,v) { console.log(v); }};
tomtor / rdtape.c
Created Mar 19, 2016
Convert SIMH simulator tapes to normal files
View rdtape.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
* Convert SIMH simulator tapes to normal files
* Copyright 2016 Tom Vijlbrief
* tvijlbrief at gmail dot com