Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mtfurlan on github.
  • I am mfurland (https://keybase.io/mfurland) on keybase.
  • I have a public key whose fingerprint is 346D 9542 CB51 4A61 6DC1 F463 2BA1 1D38 9209 0E84

To claim this, I am signing this object:

#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.9a
#!/bin/bash
#worked on raspian on 2015-01-12
# exit on error
set -e
mkdir $HOME/tmux_tmp
cd $HOME/tmux_tmp
wget "https://cloud.github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz"
#!/bin/bash
### BEGIN INIT INFO
# Provides: syncthing
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Syncthing
### END INIT INFO
mark@vaermina(s):~/Downloads/3d$ mattercontrol
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Request Failed: Device firmware and make/model do not match
diff --git a/apticron b/apticron
index d2eea06..e0bbbae 100755
--- a/apticron
+++ b/apticron
@@ -1,4 +1,5 @@
#!/bin/bash -e
+set -eo pipefail
# Character set handling differs between the different mailx
# implementations in Debian. Make sure we send proper headers, and a
@mtfurlan
mtfurlan / humbleBundleDownload.js
Last active March 2, 2020 17:39
Download humble bundle books
let rows = Array.from(document.getElementsByClassName('row'));
let outStr = '#!/bin/bash\nset -euo pipefail\ncd $(dirname "$0")\n\n'
rows.forEach((row) => {
let title = row.getAttribute("data-human-name");
//outStr += `echo '${title}'\n`; //this doesn't escape properly
Array.from(row.getElementsByTagName('a')).filter((element) => {
return element.href.includes('dl.humble.com');
@mtfurlan
mtfurlan / gist:80dc5b5956b5f69a20485e990b3069e9
Created May 27, 2020 02:38
parse google takeout youtube watch history to list of channels with number of videos
tidy ./Takeout/YouTube\ and\ YouTube\ Music/history/watch-history.html 2>/dev/null | perl -ne '$_ = $_ . <> if /youtube\.com\/channel[^<]*(?!<\/a><br>)$/m; if( /youtube.com\/channel\/[a-zA-Z0-9]*">([^<]*)/) {$data = $1; $data =~ s/\n/ /g; print "$data\n";} ' | sort | uniq -c | sort -bnr | less
@mtfurlan
mtfurlan / plot-hpgl-gpib.pl
Created July 17, 2020 15:07
send HPGL to plotter over GPIB
#!/usr/bin/env perl
# Send HPGL to plotter
#
# Unrelated curious marc video on pen adapter https://youtu.be/h-oj4HrTH14?t=471
use strict;
use warnings;
use LinuxGpib;
use Getopt::Std;
@mtfurlan
mtfurlan / read lines.sh
Last active July 27, 2020 01:31
Bash read line loop
#!/bin/bash
historyDir=/tmp/historyTest
function handle() {
echo "now run '$1'"
}
function cleanup() {
history -w $historyDir/$UID
}