Listing posts
Displaying posts 1 - 5 of 371 in total2026-11-15
0. config ~/.config/opencode/opencode.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | { "$schema": "https://opencode.ai/config.json", "permissions": [ { "action": "external_directory", "resource": "*", "effect": "ask" }, { "action": "read", "resource": "*.env" , "effect": "deny" }, { "action": "read", "resource": "~/.ssh/*" , "effect": "deny" }, { "action": "shell", "resource": "*" , "effect": "ask" } { "action": "shell", "resource": "git status *", "effect": "allow" }, { "action": "shell", "resource": "git diff *" , "effect": "allow" }, { "action": "shell", "resource": "git push *" , "effect": "deny" }, { "action": "shell", "resource": "ssh *" , "effect": "deny" }, { "action": "shell", "resource": "scp *" , "effect": "deny" }, ], "policies": [ { "action": "tool.use", "resource": "shell:sudo *", "effect": "deny" }, ], } |
1. Rails contexts
1.1 rails-ai-context
1.2 mvc-context-rails
- https://mooktakim.com/blog/mvc-context-rails/
- https://github.com/mooktakim/skills/tree/main/rails-context
2. Docs
- https://opencode.ai/docs/permissions/
- https://opencode.ai/docs/policies
- https://medium.com/rigel-computer-com/opencode-harden-your-opencode-json-fa75402d8846
- https://gethasp.com/guides/hardening-opencode-for-production/
3. Docker / Sandboxing
~~~ * ~~~
2026-11-10
in friggitrice ad aria
- incidere verticalmente
- 20 minuti a 180°, non serve mescolare a metá cottura
al microonde
Procedimenti possibili:
- Incidere la cestagne nella parte più larga formando un cerchio ed infornarle nel microonde per 4 minuti alla massima potenza
- Tagliare le castagne quasi in due parti ed infornarle nel microonde per 4 minuti scarsi alla massima potenza.
- Incidere la buccia e coprirle d'acqua in una ciotola per 10 minuti, scolare, distribuire su un piatto, e infornare nel microonde per 4 minuti scarsi alla massima potenza (non oltre i 750 watt).
Fonte: GialloZafferano
~~~ * ~~~
~~~ * ~~~
2026-11-09
There are various audio recorders on the market, you could have stumbled upon one of these or something similar:
| Name, model | Specs | Notes |
|---|---|---|
| Victure, X5 | 8GB, 12h, 510mAh |
stylish and solid (glass+metal) |
| Elegiant, CupGtdQWy | 8GB, 16h | bulky and simple design with very long recording time |
| Pendrive recorder | 8GB | very cheap, fragile, buggy, small battery, decent recordind time |
some of them can record directly in MP3 format but this depletes the battery faster than the WAV one.
Using the WAV format produces a file not suitable as input of our beloved tools like lame, oggenc or opusenc, we can use mplayer to convert it to a suported format:
1 2 3 4 5 6 7 8 9 10 | apt install mplayer opus-tools # convert WAV file to a supported format mplayer -vo null -vc null -ao pcm:fast:file=in_ok.wav in.wav # compress the converted WAV file in OPUS opusenc --bitrate 24 in_ok.wav out.opus # using ffmpeg ffmpeg -i input.mp3 -f wav - | opusenc --bitrate 24 - output.opus |
you can use the attached recorder2opus.rb script that uses a named pipe file to avoid the creation of the converted WAV file.
Using the Victure X5 recorder with the lowest WAV quality I made some compression tests in MP3, OGG and OPUS and these are the results:
- File size at the same bitrate: MP3 > OGG > OPUS. So OPUS is the winner.
- A meaningful bandpass range for voice recordings is about 11kHz so we should use an OPUS bitrate between 24-28Kb/s (see reccommended settings). The audio quality remains high in the range 20-28Kb/s but below the 24Kb/s the file size increases. So 24Kb/s is the winner.
- Trying to downmix to MONO always gave a bigger file. So it is better to keep it STEREO.
Play an opus files in console with standard tools:
1 | opusdec --force-wav --quiet file.opus - | aplay |
Here is a bash script to convert any audio file to opus:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/bin/bash FNAME=$1 FIFO=/tmp/audio2opus.fifo if [ ! -f "$FNAME" ]; then echo "file [$FNAME] not found!" exit fi mkfifo $FIFO mplayer \ -really-quiet -vo null -vc null \ -ao pcm:fast:file=$FIFO \ -slave -input file=/dev/null "$FNAME" & sleep 1 opusenc --bitrate 24 --title "${FNAME%.*}" \ $FIFO "${FNAME%.*}.ogg" sleep 1 rm -f $FIFO |
Reference: xiph.org, Vorbis, Opus & Opus FAQ, Lame encoder, Mplayer
~~~ * ~~~
