Skip to content

Instantly share code, notes, and snippets.

Avatar
📎
procrastinating...

hyphenc

📎
procrastinating...
View GitHub Profile
@hyphenc
hyphenc / unicode-emoji-v14.0.txt
Created January 7, 2022 00:19
unicode version 14.0 relevant emoji (gender-neutral options)
View unicode-emoji-v14.0.txt
😀 grinning face
😃 grinning face with big eyes
😄 grinning face with smiling eyes
😁 beaming face with smiling eyes
😆 grinning squinting face
😅 grinning face with sweat
🤣 rolling on the floor laughing
😂 crying laughing
🙂 slightly smiling face
🙃 upside-down face
@hyphenc
hyphenc / extract-emoji.fish
Created January 5, 2022 22:43
extract emoji
View extract-emoji.fish
#!/bin/bash
# download this pages as html
# https://unicode.org/emoji/charts/full-emoji-list.html
paste -d " " (grep -oP "(?<=<td class='chars'>).*?(?=</td>)" Full\ Emoji\ List,\ v14.0.html | psub) (grep -oP "(?<=<td class='name'>).*?(?=</td>)" Full\ Emoji\ List,\ v14.0.html | psub) > ~/emojout
@hyphenc
hyphenc / precise-age-in-years.fish
Created June 9, 2021 21:16
print precise age (precision: 9 after decimal point) in fish shell. replace date
View precise-age-in-years.fish
while true
printf "%.11g\r" (echo "("(date +%s%5N)"-"(date -d '2000-01-01 00:01' +%s%5N)")/100000/60/60/24/365.25" | bc -l)
end
@hyphenc
hyphenc / mp3-sony-walkman-fix.fish
Last active June 9, 2021 22:57
mp3 player (sony walkman) album art not displayed fix [fish shell]
View mp3-sony-walkman-fix.fish
# fix album cover art not being recognized by various (sony walkman) mp3 players (~2011ish)
mkdir ./img
for i in (ls -1 *.mp3)
eyeD3 --write-images=img "$i"
eyeD3 --remove-all-images "$i"
# this is the magic. convert progressive to baseline jpgs
convert img/FRONT_COVER.jpg -interlace none img/cov.jpg
eyeD3 --add-image "img/cov.jpg:FRONT_COVER" "$i"
rm img/*
@hyphenc
hyphenc / pulseaudio-mic-auto-adjust-fix.txt
Last active April 26, 2021 19:57
pulseaudio fix autoadjusting mic
View pulseaudio-mic-auto-adjust-fix.txt
# https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting
append
[Element Mic Boost]
volume = zero
[Element Int Mic Boost]
volume = zero
@hyphenc
hyphenc / startpage-light-mode.css
Last active July 20, 2020 19:32
light mode for my startpage, see hyphenc/startpage on github
View startpage-light-mode.css
@font-face {
font-family: "Fira Code";
src:local("Fira Code Regular"),
url("font/firacode.woff2") format("woff2"),
url("font/firacode.woff") format("woff");
}
* {
font-family: "Fira Code", monospace;
font-size: 20px;
background-color: #eee;
@hyphenc
hyphenc / genbooklist.sh
Last active October 24, 2022 20:32
tools für amazon wishlists mit büchern
View genbooklist.sh
#!/bin/bash
# usage: ./genbooklist WISHLIST_ID
# please make sure to set $FILE to the desired output file
set -eu -o pipefail
ID="$1"
FILE=""
# if you're not from germany, change the tld
URL="https://www.amazon.de/hz/wishlist/printview/""$ID"
@hyphenc
hyphenc / rssmanage.sh
Last active July 4, 2020 13:44
manage an rss feed
View rssmanage.sh
#!/bin/bash
set -eu -o pipefail
FEEDTITLE="" # feed title (as displayed in rss readers)
FEEDLINK="" # link to the .rss file, publicly accesible
RSSLINKTO="" # where the feed links to (ex: website)
FEEDIMAGEURL="" # use this as the feed image
FEEDDESCRIPTION="" # short feed description
RSSFILE="./feed.rss"
RSSDATE="$(date +%a,-%d-%b-%Y-%T-%z | sed -e 's/-/ /g')"
@hyphenc
hyphenc / href-for-list.js
Last active July 27, 2021 15:18
javascript snippets
View href-for-list.js
# print all href links in list, however deep. use devtools, rightclick > copy > selector
document.querySelectorAll(" SELECTOR ").forEach(y=>console.log(y.href))
@hyphenc
hyphenc / hugendubel-instock.sh
Last active October 22, 2021 12:56
hugendubel "ist $buch in $laden verfügbar" checker -- doesnt work anymore bc javascript is now required to search on the site ... >.>
View hugendubel-instock.sh
#!/bin/bash
# hugendubel ladenvorrat checker
# usage: ./instock.sh <ISBN13>
set -e -o pipefail
[[ -z "$1" ]] && echo -e "error: no isbn\n usage: ./instock.sh <ISBN13>" && exit 1
# check if $1 matches ISBN13 format
[[ ! $(grep -P '978[0-9\-]{10}' <<< "$1") ]] && echo "error: that's not an ISBN" && exit 1