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
#!/usr/bin/perl | |
# | |
# tumblrparse.pl | |
# Parse a directory of tumblr backup html posts and output as JSON. | |
# Ignoring title and media. | |
# | |
use warnings; | |
use strict; | |
use JSON::PP; |
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
#!/usr/bin/perl | |
# wp.pl - write to file and stdout | |
use strict; | |
use warnings; | |
use POSIX "strftime"; | |
my $file = strftime "%Y-%m-%d_%H-%M-%S.log", localtime; | |
open (my $fh, ">", $file) or die "cannot open $file: $!\n"; |
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 | |
# 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" |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int to_dec(char *bin) { | |
unsigned int dec = 0; | |
unsigned int weight = 1; | |
bin += 8 - 1; | |
for(int i=0; i<8; i++, --bin) { | |
if(*bin == '1') { |
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
/* firefox's "copy > css selector" feature is seriously awesome */ | |
/* sidebar elements (more from yt, footer, etc) */ | |
ytd-guide-section-renderer.style-scope:nth-child(3) { | |
display: none; | |
} | |
ytd-guide-section-renderer.style-scope:nth-child(4) { | |
display: none; | |
} |
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
๐ 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 |
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 | |
# 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 |
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 | |
# 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 |
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
# print all href links in list, however deep. use devtools, rightclick > copy > selector | |
document.querySelectorAll(" SELECTOR ").forEach(y=>console.log(y.href)) |
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
# 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/* |
NewerOlder