diff --git a/mirrorpdf/mirrorpdf b/mirrorpdf/mirrorpdf new file mode 100755 index 0000000..5977977 --- /dev/null +++ b/mirrorpdf/mirrorpdf @@ -0,0 +1,75 @@ +#!/bin/bash + +: <<=cut +=pod + +=head1 NAME + +mirrorpdf - Mirror PDF horizontally + + +=head1 SYNOPSIS + +B I + + +=head1 DESCRIPTION + +B mirrors the pages of a PDF-file. Output is in +I_mirror.pdf. + +=head1 EXAMPLE + +Mirror pages of foo.pdf: + + mirrorpdf foo.pdf + +=head1 AUTHOR + +Copyright (C) 2018 Ole Tange, +http://ole.tange.dk and Free Software Foundation, Inc. + + +=head1 LICENSE + +Copyright (C) 2012 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +at your option any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + + +=head1 DEPENDENCIES + +B uses B, B, B, and B. + + +=head1 SEE ALSO + +B + + +=cut + +mirror() { + tmp=`mktemp /tmp/mirpdfXXXXX` + pdf2ps "$1" - | + # Flip both horizontally and vertically + pstops H | + ps2pdf - $tmp + # Flip both horizontally and vertically + pdftk $tmp cat 1-endnorth output "$2" + rm $tmp +} +export -f mirror +parallel mirror {} {.}_mirror.pdf ::: "$@" + diff --git a/wifi-reload/wifi-reload b/wifi-reload/wifi-reload index 67ba07b..409bc52 100755 --- a/wifi-reload/wifi-reload +++ b/wifi-reload/wifi-reload @@ -51,18 +51,26 @@ B(1) =cut +modules="iwl4965 iwl3945 iwldvm ath9k ath9k_common ath9k_hw ath ath3k brcmfmac rt73usb rt2x00lib cfg80211 mac80211" + sudo killall wpa_supplicant -sudo parallel -j1 modprobe -r ::: iwl4965 iwl3945 iwldvm ath9k ath9k_common mac80211 ath9k_hw ath cfg80211 ath3k -sleep 1 +sudo parallel -j0 --delay 0.03 --retries 50 modprobe -r ::: $modules sudo killall -9 wpa_supplicant -parallel -j1 sudo modprobe ::: ath9k ath9k_common mac80211 ath9k_hw ath cfg80211 ath3k iwldvm iwl3945 iwl4965 +parallel -j1 sudo modprobe ::: $modules +sudo rfkill unblock all PID=$(sudo NetworkManager 2>&1 | grep -Eo '[0-9]+') sudo kill $PID || sudo killall NetworkManager sleep 1 sudo kill -9 $PID -sudo NetworkManager & +#sudo NetworkManager & if tty -s ; then # STDIN is terminal - timeout 12 forever dmesg | puniq + timeout 12 dmesg -Tw + # timeout 12 forever dmesg | puniq fi + +sudo bash -c 'cat >> /etc/resolv.conf' < /etc/resolvconf/resolv.conf.d/head +sudo iwconfig wls1 essid Turris +sudo dhclient wls1 & +sudo wpa_supplicant -Dwext -c/etc/wpa_supplicant.conf -iwls1 -d &