Skip to content

Instantly share code, notes, and snippets.

@BjoernSchilberg
BjoernSchilberg / pyxel-play.py
Last active March 24, 2025 16:48
pyxel MML(Music Macro Language) mini demo
import pyxel
pyxel.init(100, 100)
m1 = "t90 @1 o2 q8 l16 x0:7654 x1:743 x0d4x1f8d8e8fgx0f8.x1e x0d4defgx1a8ga>c8dc< f8b-8x0a2>c+efg x1a8gfe8fg fed8f8ed <b8>c+dc+dec+defab-8a8 g8f8x0g4.<x1g8f8e8 x0q7d2"
m2 = "t90 @1 o1 q8 l8 x0:532 x0 f4afgaa4 f4b-4a4>g4< b-4>e4d4g4 b-d<b->c<a>daf g+de<a>a>cfe dc<bgedc+<g q7f2"
m3 = "t90 @0 o1 q8 l8 v6 d2c4<b-4& b-4g4f4>e4 d4c+4<b-4a4 g4>c4<f4b4 e4agfed>c< b-ag4&gb-a4> q7d2"
pyxel.sounds[0].mml(m1)
pyxel.sounds[1].mml(m2)
@BjoernSchilberg
BjoernSchilberg / main.c
Created March 5, 2025 20:56
"Event Horizon" in one equation
// https://x.com/tsoding/status/1897049953090068614/photo/1
//cc -o main main.c -lm && ./main
#include <stdio.h>
#include <math.h>
#define WIDTH 30
#define HEIGHT 30
int main() {
float w = WIDTH;
@BjoernSchilberg
BjoernSchilberg / shortcuts.md
Last active February 9, 2024 20:42 — forked from memphys/shortcuts.md
Bash Shortcuts For Maximum Productivity
@BjoernSchilberg
BjoernSchilberg / p.sh
Created January 21, 2024 16:47 — forked from rauchg/p.sh
Perplexity CLI in pure shell
#!/usr/bin/env bash
function p() {
jq -n \
--arg content "$*" \
'{
"model": "pplx-7b-online",
"messages": [
{
"role": "system",
"content": "Be precise and concise."
@BjoernSchilberg
BjoernSchilberg / nvidia.md
Created January 10, 2024 17:51 — forked from standaloneSA/nvidia.md
Nvidia GPUs sorted by CUDA cores
@BjoernSchilberg
BjoernSchilberg / create_wave_file.c
Created December 23, 2023 19:36
How to Write a Wav File in C
// main.c
// https://www.youtube.com/watch?v=8nOi-0kBv2Y
// gcc create_wave_file.c -o create_wave_file -lm
// or clang create_wave_file.c -lm
#include <math.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
@BjoernSchilberg
BjoernSchilberg / .vimrc
Created December 23, 2023 09:25
My .vimrc file I use mostly with gVim
set number
color desert
syntax on
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set expandtab
@BjoernSchilberg
BjoernSchilberg / journalctl.txt
Last active August 12, 2023 21:23 — forked from MrAndrewMal/journalctl.txt
How to read live-tail logs of multiple services with journalctl
#Systemd - How to read live-tail logs of multiple services with journalctl
sudo journalctl --follow _SYSTEMD_UNIT=docker.service + _SYSTEMD_UNIT=apache2.service
Hint:
https://serverfault.com/questions/805775/journalctl-how-to-display-colors-in-its-output/893763#893763
If the original daemon output is already colorized, but the colors are being lost when using journalctl, the `--output cat` option will restore them.
@BjoernSchilberg
BjoernSchilberg / README.md
Last active April 16, 2024 17:35
Small Solar Projects

Small Solar Projects

Solar Panels

  • https://www.seeedstudio.com/0-5W-Solar-Panel-55x70.html
  • MECCANIXITY Mini Solar Panel Cell 3V 125mA 0.375W 52mm x 52mm for DIY Electric Power Project Pack of 10
  • AOSHIKE 10Pcs 3V 120mA Micro Solar Panels Cells DIY Solar Epoxy Plate Electric Toy Materials Photovoltaic Cells Charger 60mmx55mm/2.36"x2.16"

low-power microcontrollers that could potentially be powered directly from a small solar panel