Skip to content

Instantly share code, notes, and snippets.

Spritz sans oeufs

=====

Les ingredients


115 gramme(s) de farine 30 gramme(s) de maïzena 30 gramme(s) de sucre glace 150 gramme(s) de chocolat

#!/bin/zsh
# switch a2dp ot hfh codec for bluetooth headset to have quality sound or mic
# GistID: 418ff6f6ff9f3c0ea5adc22fcf43d65b
HEADSET=$1
HIGH_QUALITY=$(pacmd list-cards | grep -B5 -A20 -c -e 'active profile: <a2dp_sink>' -e 'device.description = "'$HEADSET'"')
echo "test: $HIGH_QUALITY"
QUALITY=a2dp_sink
#!/bin/zsh
# utility to get level battery for i3pystatus
# need the device name as argument
# GistID: abb0acf1bfd890713aadeef7e46fe834
MAC=$(bluetoothctl devices | grep "$1" | cut -d" " -f2)
LEVEL=$(bluetoothctl info $MAC | grep -q Connected && based-connect $MAC -b)
if [ $LEVEL ]
then
#!/bin/zsh
#
# i3 new workspace based on folder or git name selected by fzf menu
#
# GistID: 6509cdf90fe43fa4017bef50ad63f909
cd $1
sleep 0.1
FILE_TO_OPEN=$(fd | fzf --reverse --height=20% --no-info --color=dark,pointer:#859900,prompt:#859900,fg:#002b36,bg:#eee8d5,bg+:#859900,fg+:#002b36,marker:#eee8d5,pointer:#eee8d5,query:#002b36,hl:#859900,hl+:#eee8d5)
PATH_TO_FILE=$(realpath $FILE_TO_OPEN)
<?xml version="1.0" encoding="utf-8"?>
<opml version="2.0">
<head>
<title>gPodder subscriptions</title>
<dateCreated>Sat, 03 Dec 2022 10:37:23 +0100</dateCreated>
</head>
<body>
<outline title="Les Cours du Collège de France" text="Les grandes voix du savoir pour tous. Rendez-vous sur l'application Radio France pour découvrir tous les autres épisodes." xmlUrl="http://radiofrance-podcast.net/podcast09/rss_11921.xml" type="rss"/>
<outline title="Le Cours de l'histoire" text="Mieux comprendre quotidiennement le lien étrange qui nous unit au passé.
Du lundi au vendredi de 9h à 10h. Rendez-vous sur l'application Radio France pour découvrir tous les autres épisodes." xmlUrl="http://radiofrance-podcast.net/podcast09/rss_10076.xml" type="rss"/>
# install and configure oh-my-zsh
# GistID: a575ab9f07e5e448ba9584061b3694ca
# configure
echo "
#--move this block in begining--
ZSH_THEME=\"agnoster\"
# custom prompt
[ ! -f \"\$ZSH/custom/themes/agnoster.zsh-theme\" ] && curl -L -o \"\$ZSH/custom/themes/agnoster.zsh-theme\" https://gist.github.com/tyjak/9f9569d9fc118c88ad3a758fc2b26502/raw/agnoster.zsh-theme
@tyjak
tyjak / map
Last active March 16, 2022 10:54
#!/bin/sh
# Popup i3 window to display an adress to openstreetmap
# dependency: curl, jq, webapp
# GistID: 4869fafa858c3540f9471f384a0d79bb
LOCATION=${@:-$(xsel -o)}
URI="https://www.openstreetmap.org/#map=18/$(curl -G --data-urlencode "q=$LOCATION" --data "format=json" https://nominatim.openstreetmap.org/search | jq -r '.[0].lat + "/" + .[0].lon')"
webapp \"$URI\" route 1000 800
@tyjak
tyjak / termite.terminfo
Created August 1, 2021 09:50
clip/config/termite.terminfo
curl https://raw.githubusercontent.com/thestinger/termite/master/termite.terminfo | sudo tic -x -
@tyjak
tyjak / dmenu-gist
Last active August 1, 2021 12:05
clip/i3/dmenu-gist
#!/bin/sh
# Dmenu for gist clip for i3
# Look to the description of the gist that star with "clip/" and get output to clipboard ready to paste
# depends on : gist, dmenu
# GistID: 380fd753428f36a05bbdb06051c1cb17
gist_menu=$(gist -l | grep "clip/" | sed 's@.*clip/@@' | sort | dmenu -p "Clips:" -l 10 -i -nb '#b58900' -nf '#eee8d5' -sb '#002b24' -fn 'MesloLGSDZ Nerd Font-10' -h ${DMENUHEIGHT:-36})
gist_target=$(gist -l | grep "clip/$gist_menu" | awk '{print $1}' | cut -d"/" -f4)
@tyjak
tyjak / remote-comand-prompt.zsh
Last active August 1, 2021 12:46
clip/zsh/command-prompt-remote
# custom remote command prompt
[ ! -f "$ZSH/custom/themes/agnoster.zsh-theme" ] && curl -L -s --output "$ZSH/custom/themes/agnoster.zsh-theme" https://gist.github.com/tyjak/9f9569d9fc118c88ad3a758fc2b26502/raw/agnoster.zsh-theme