Skip to content

Instantly share code, notes, and snippets.

View ujaehrig's full-sized avatar

ujaehrig

  • Karlsruhe, DE
  • 18:17 (UTC +02:00)
View GitHub Profile
> cargo install qsv --locked --features all_features
Updating crates.io index
Installing qsv v0.128.0
Updating crates.io index
Updating crates.io index
Compiling libc v0.2.155
Compiling proc-macro2 v1.0.84
Compiling unicode-ident v1.0.12
Compiling cfg-if v1.0.0
Compiling autocfg v1.3.0
@ujaehrig
ujaehrig / to-json.pl
Created December 11, 2019 09:38
Remove leading and trailing quote, replace common escapes with their unescaped counterpart
#!/usr/bin/perl
use warnings;
while(my $line = <STDIN>) {
$line =~ s/\\t/\t/g;
$line =~ s/\\n/\n/g;
$line =~ s/^\"//g;
$line =~ s/\"$//g;
$line =~ s/\\\"/\"/g;
print $line;
@ujaehrig
ujaehrig / prepare anrufliste_postgres.sh
Last active July 27, 2021 07:38
Script to prepare an Fritz!Box Anrufliste.csv to a format suitable for DB import
#!/usr/bin/env bash
# Remove first line (having the separator indicator)
# Change date from "dd.MM.yy hh:mm" to "yyyy-MM-dd hh:mm:ss" (with second always 00)
# Change duration from "hh:mm" to "hh:mm:ss" (with seconds always 00)
cat |
tail -n +2 |
sed -e 's/;\(..\)\.\(..\)\.\(..\) \(..:..\);/;20\3-\2-\1 \4:00;/g' |
sed -e 's/:\([0-9]\{2\}\)$/:\1:00/g'

Keybase proof

I hereby claim:

  • I am ujaehrig on github.
  • I am ujaehrig (https://keybase.io/ujaehrig) on keybase.
  • I have a public key ASDsKAVLHTbFwL_4Fy4PQkacTQBNGjGkl3fXpzb-CGAziwo

To claim this, I am signing this object: