This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Popup i3 window to display a route on openstreetmap | |
# dependency: curl, jq, webapp | |
# GistID: e41f26f331bb75e9fb532135d984ca77 | |
FROM=$1 | |
DEST=$2 | |
# set HOME_ADDR as glabal env var for your address |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Simple route request with openstreetmap | |
# depend on vimb, curl and jq | |
# GistID: 46f34adbcf7f969d2c4b60daae644b60 | |
vimb https://www.openstreetmap.org/directions\?engine\=fossgis_osrm_car\&route\=$(curl https://nominatim.openstreetmap.org/search\?q\=$1\&format\=json | jq -r '.[0].lat + "%2C" + .[0].lon')%3B$( curl https://nominatim.openstreetmap.org/search\?q\=$2\&format\=json | jq -r '.[0].lat + "%2C" + .[0].lon' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# source: https://flx.ai/2019/bose-qc35ii-linux | |
# GistID: 3045abbf25bef7742047835e6aaa4788 | |
actions="toggle|prev|next|forw|back" | |
# Check for correct usage | |
if [[ $# -ne 1 || ! "$1" =~ ^($actions)$ ]]; then | |
echo "Usage: " | |
echo "${0##*/} [${actions[*]}]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# GistID: 45209142f7aa3ac3710417c2de58cdf1 | |
# Sync one way opml file from ttrss server to newsbeuter | |
opml_file=${NEWS}.opml | |
news_file=$NEWS | |
ttrss_server=$TTRSS_SERVER | |
#sync_time=604800 | |
sync_time=10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# GistID: e4eb7bf3ed820cbd24b2be1da71f1068 | |
# Get text of the first result of a wikipedia search as argument | |
# Dependencies: http, jq, sed | |
http https://fr.wikipedia.org/w/api.php\?format\=json\&action\=query\&generator\=search\&gsrsearch\=$1\&gsrlimit\=1\&prop\=extracts\&explaintext\=1 | jq '.query.pages | map(values) | .[0].extract' | sed 's/\\n/\n/g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"currency": "g1", | |
"endpoints": [], | |
"rmEndpoints": [], | |
"upInterval": 3600000, | |
"c": 0.0488, | |
"dt": 86400, | |
"dtReeval": 15778800, | |
"ud0": 1000, | |
"stepMax": 5, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# duniter reverse proxy conf | |
# GistID: 73fb5272f602c5011aeaaf6b4f8b00d0 | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 80; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
reverse-proxy: | |
image: nginx | |
volumes: | |
- ./nginx.conf:/etc/nginx/conf.d/default.conf | |
- /etc/letsencrypt/:/etc/letsencrypt/ | |
ports: | |
- 443:443 | |
networks: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
set -e | |
# copy all titles of dvd | |
# GistID:48c17774a5adb5c1bd45def1a21bd16e | |
dirpath="${1:-$(pwd)}" | |
title=$(HandBrakeCLI -i /dev/sr0 -t 0 2>&1 | grep "DVD Title:" | sed -E 's/.*DVD Title: (.*)$/\1/') | |
HandBrakeCLI -i /dev/sr0 -t 0 -v 2>&1 | grep '+ title' | sed -E "s@[^0-9]*([0-9]+):\$@HandBrakeCLI -i /dev/sr0 -m -t \1 -o \"${dirpath}/${title}_\1.mp4\"@" > /tmp/handbrake-tasks.sh | |
sh /tmp/handbrake-tasks.sh | |
#more ~/handbrake-sample.txt | grep '+ title' | sed -E "s@[^0-9]*([0-9]+):\$@HandBrake -t \1 -o \"$1 \1.mp4\"@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# | |
# Simple wrapper to havce website embedded in a vimb floating window | |
# depends on i3 and vimb | |
# GistID:e8e5001619c9d8755b08be2ae4f0516d | |
URI=$1 | |
NAME=${2:-$1} |