Skip to content

Instantly share code, notes, and snippets.

@angelo-v
angelo-v / helpme.sh
Created March 3, 2026 17:15
Shell alias that uses local llm to find a shell command for a given task
alias helpme='f() { printf "%s\n" "$*" | ollama run qwen2.5-coder "output as shell command with a one-line description"; }; f'
@angelo-v
angelo-v / claude-workspaces.sh
Created February 25, 2026 16:12
Bash/Zsh wrapper that overrides claude to require an explicit workspace argument and automatically maps it to ~/.claude/settings.<workspace>.json, failing if no workspace or matching settings file is provided while transparently forwarding all additional CLI arguments.
claude() {
if [[ $# -lt 1 ]]; then
echo "Usage: claude <workspace> [args...]" >&2
return 1
fi
local workspace="$1"
shift
local settings_file="$HOME/.claude/settings.${workspace}.json"
@angelo-v
angelo-v / docker-compose.yml
Created November 28, 2021 13:29
docker-compose Konfiguration für rhasspy smart-speaker inklusive Basis-Skills aus angelo-v/rhasspy-skills
version: "3"
services:
rhasspy:
container_name: rhasspy
image: "rhasspy/rhasspy"
pull_policy: always
ports:
- "12101:12101"
volumes:
### Keybase proof
I hereby claim:
* I am angelo-v on github.
* I am aveltens (https://keybase.io/aveltens) on keybase.
* I have a public key ASDxPZhEfq5Mt-0flxx3wpL1eVozymrlYNCStZUufm4LAAo
To claim this, I am signing this object:
@angelo-v
angelo-v / jwt-decode.sh
Last active February 17, 2026 13:23
Decode a JWT via command line
# will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904
function jwt-decode() {
sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq
}
JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
jwt-decode $JWT
@angelo-v
angelo-v / autotype.js
Last active November 27, 2015 18:51
Literally a "cheat code" for the speed test at http://10fastfingers.com/typing-test/
(function() {
var next = jQuery.Event("keyup");
next.which = 32;
var firstword = $('#words span.highlight').text()
var typenext = function(word) {
$('#inputfield').val(word);
$('#inputfield').trigger(next);
var nextword = $('#words span.highlight').text()
@angelo-v
angelo-v / renameTab.js
Last active February 24, 2026 07:44
Rename Tab Bookmarklet
javascript:(function(){var title=prompt("New title?");document.title=title})();
@angelo-v
angelo-v / download-java
Created February 2, 2013 18:11
Quick and dirty linux command line scripts to download and update java. It might not fit to your environment. Enhance and adapt it if you like, but use it on your own risk!
# pass url of a java *.tar.gz file as the first and only parmeter
url=$1
tmp=.temporary-java-download
function confirm () {
echo $1
select yn in "Yes" "No"; do
case $yn in
Yes ) return 1; break;;