Skip to content

Instantly share code, notes, and snippets.

View Josverl's full-sized avatar

Jos Verlinde Josverl

View GitHub Profile
cd $env:USERPROFILE
cd documents
gpupdate /target:computer /force /wait:-1
gpresult /scope:computer /h GPresult.html /f
ii GPresult.html
# runs on MicroPython (and Python)
# get file and folder information and return this as JSON
# params : folder , traverse subdirectory , output format, gethash
# intended to allow simple processing of files
# jos_verlinde@hotmail.com
import uos as os, json
import uhashlib,ubinascii
import logging
logging.basicConfig(level=logging.DEBUG)
# Determine the root folder of the device
import os
try:
_ = os.stat('/flash')
r = "/flash"
except OSError as e:
if e.args[0] == errno.ENOENT:
r = os.getcwd()
finally:
print("'{}'".format(r))
// verify the ABI version of compiled native modules
// Copyright (c) 2019 Jos Verlinde
// License : MIT
const os = require('os');
const fs = require('fs');
const path = require('path');
/// dummy copy of internal function
function Module(id, parent) {
@Josverl
Josverl / ApprovalConformation-1.json
Last active May 12, 2021 08:57
Teams and Power Platform in a Day: Lab 02 - Adaptive Card - ApprovalConformation
{
"type": "AdaptiveCard",
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"padding": "none",
"body": [
{
"type": "Container",
"style": "emphasis",
"items": [
{
Let [tag] = any tag in upstream repo
git fetch upstream --tags
git push origin --tags
@Josverl
Josverl / medxnote-ACfailure.json
Created September 16, 2021 19:18
Adaptive card that fails to post
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3",
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Test"
}
],
@Josverl
Josverl / axp192.py
Created October 6, 2021 00:23 — forked from ropg/axp192.py
Pure python driver for AXP192 Power Management IC
# Python driver for the AXP192 Power Management IC.
#
# https://gist.github.com/ropg/7216ba90a9d7697114d4ba8aea7bee3c
#
# Written in 2021 by Rop Gonggrijp.
#
# Some functionality inspired by C driver written by Mika Tuupola
# (https://github.com/tuupola/axp192) and a fork of that maintained by
# Brian Starkey (https://github.com/usedbytes/axp192)
#

how to add :

git submodule add --force -b master https://github.com/micropython/micropython.git 
git submodule add --force -b master https://github.com/micropython/micropython-lib.git 

how to re-configure existing submodules:

git config -f .gitmodules submodule.micropython.branch master
git config -f .gitmodules submodule.micropython-lib.branch master
@Josverl
Josverl / UART_trace.txt
Created October 16, 2022 18:24
Mpremote timing
Debug port opened
[[[ 1
\x01\x04
>>>
>>>
>>>
>>>
raw REPL; CTRL-B to exit
>OK
MPY: soft reboot