Skip to content

Instantly share code, notes, and snippets.

@Spiritdude
Spiritdude / blkenvflash
Created June 18, 2024 10:21
LuckFox Pico Pro/Max SD card writer from .env.txt
#!/usr/bin/python3
# == BLKENVFLASH == written by Rene K. Mueller <[email protected]>
#
# Description:
# Writes an image (.img) or to the SD card direct from existing .env.txt for LuckFox Pico Pro/Max
#
# % ./blkenvflash disk.img
# -- inquery with `lsblk` which device is your SD card resides --
# % sudo dd if=disk.img of=/dev/sdX bs=1M; sync
@Spiritdude
Spiritdude / README.md
Last active March 27, 2020 11:02
kiwix-serv / ZIM as RESTful Service

kiwix-serve as RESTful API

In order to pull search results from wikipedia, wiktionary, wiktionary, or gutenberg book collection and various other sources, it can be patched together:

  • nginx as proxy to provide CORS
  • kiwix-serve as backend

and XHR in a WebApp using JS is possible, yet, the results one needs to parse line-wise (easy) or html2json (complex) to get the formated results:

nginx config:

   location /zim {
// title : CTC Label
// author : Rene K. Mueller
// license : MIT License
// description: create your own label plate
// date : 2018/11/01
// file : ctc_label.jscad
function main() {
var param = { thickness: 3, name: "CTC DIY I3 Pro B" };
var o = []; // our stack of objects
// title : CTC Serial
// author : Rene K. Mueller
// license : MIT License
// description: create your own serial plate for "CTC A9999"
// date : 2018/03/27
// file : ctc_serial.jscad
function getParameterDefinitions() {
return [
{ name: 'serial', initial: "CTC A9999", type: 'text', caption: 'Serial' },
@Spiritdude
Spiritdude / gpio2.md
Created March 17, 2018 05:38
Unified gpio documentation example 2

GPIO Module

[base intro]

gpio.mode()

[base info on gpio.mode()]

gpio.config()

[base info on gpio.config()]

gpio.trig()

[base info of gpio.trig()]

Specifics

@Spiritdude
Spiritdude / gpio.md
Created March 17, 2018 05:35
Unified gpio documentation example

GPIO

This module provides access to the GPIO (General Purpose Input/Output) subsystem.

gpio.mode(pin,mode,...)
gpio.config({pin=p, mode=m, dir=d, ...})
gpio.write(pin,v)
gpio.read(pin)
gpio.trig(pin,...)
Verifying that "spiritdude.id" is my Blockstack ID. https://onename.com/spiritdude
@Spiritdude
Spiritdude / mediatopic.json
Created April 13, 2016 05:16
IPTC mediatopic.json
{
"mt01000000" : {
"definition" : {
"de" : "Sachverhalte, die die Veränderung und Weiterentwicklung des menschlichen Geistes, der Interessen, des Geschmacks, der Fähigkeiten und der Gefühle betreffen",
"en" : "Matters pertaining to the advancement and refinement of the human mind, of interests, skills, tastes and emotions "
},
"label" : {
"ar" : "فنون، ثقافة وترفيه",
"de" : "Kultur, Kunst, Unterhaltung",
"en" : "arts, culture and entertainment",
### Keybase proof
I hereby claim:
* I am Spiritdude on github.
* I am spiritdude (https://keybase.io/spiritdude) on keybase.
* I have a public key whose fingerprint is AC5B 7E68 8107 E45F 4A31 4DEE FC2C AF8C 93F4 B8CF
To claim this, I am signing this object:
// title: New Sphere
// author: Rene K. Mueller
// description: geodesic approach to the sphere, in contrast with openscad-like
function getParameterDefinitions() {
return [
{ name: "fn", type: "float", initial: 32, caption: "Resolution" }
];
}