This file contains 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 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 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 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 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 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
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 |
This file contains 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/* |
This file contains 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
# https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting | |
append | |
[Element Mic Boost] | |
volume = zero | |
[Element Int Mic Boost] | |
volume = zero |
This file contains 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
@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; |
This file contains 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" |
NewerOlder