Skip to content

Instantly share code, notes, and snippets.


Miroslav Prýmek mprymek

View GitHub Profile
# How to upgrade Porcupine 1.9.x installed by Rhasspy 2.5.11 DEB to version 2.x
sudo su -
# Install Rhasspy 2.5.11 (replace "armel" with your architecture if needed)
dpkg -i rhasspy_armel.deb
# If you have Rhasspy already installed, just stop it.
systemctl stop rhasspy
View rhasspy-porcupine-v2.diff
This patch makes Rhasspy v2.5.11 work with Porcupine version 2.x (i.e. the version supporting
newly generated time-unlimited free-tier wake words).
Based on Sturi2011's instructions.
--- usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/defaults.json.orig 2022-11-11 16:55:04.320481943 +0100
+++ usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/defaults.json 2022-11-11 16:57:20.668415989 +0100
@@ -438,7 +438,8 @@
"compatible": true,
"keyword_path": "porcupine.ppn",
View demo_ha_blink.c
View main.cpp
#include <Arduino.h>
#include "csp.h"
#define BLINK_DELAY_MS 100
void blink_led1(task_data_t data) {
uint32_t state = (uint32_t)data;
digitalWrite(LED1_PIN, state);
View 01-simplest.exs
# Simplest possible actor - just prints received messages.
defmodule SimplestActor do
def run() do
receive do
{from, msg} ->
IO.puts("[SimplestActor] Got message from #{inspect(from)}: #{inspect(msg)}")
View din-rail-clip.scad
Simple OpenSCAD DIN rail clip.
module clip(z = 6) {
a = 7;
b = 1.2; // metal sheet thickness, should be ~ 1
c = 2.5;
import asyncio
import asyncio.futures
import logging
import aiojobs
logging.basicConfig(format='[%(levelname)-7s] %(message)s', level=logging.DEBUG)
logger = logging.getLogger(__name__)
class Nursery:
mprymek / langosh-plain.c
Created February 4, 2019 00:03
First Langosh language proof of concept implementation
View langosh-plain.c
Just a small weekend experiment...
First experimental implementation of the Langosh language ("plain", i.e. really minimal version).
Langosh is meant to be a language which:
- can be easily machine-generated from Scratch-like visual programming tools (Blockly preferably)
- interpreter is small enough to fit in a small MCU (ATMega328 preferably)
View gist:ab5f1efdf3fe13139e58099ae423cd4b
/* Pleroma light theme customization */
#app {
background-image: none !important;
background-color: rgba(241, 241, 241, 1);
#heading {
background-image: none !important;
background-color: rgba(255, 255, 255, 1) !important;
View main.go
Golang's methods are not "virtual" or "overridable".
Don't expect OOP-like inheritance, use composition instead.
Try it here:
package main