ffmpeg -f concat -safe 0 -i <(printf "file '$PWD/%s'\n" ./*.wav) -c copy output.wav
---
libreoffice --headless --convert-to pdf file.xlsx
to convert csv to pdf (takes forever tho; but produces output of a decent size; but poor quality):
libreoffice --headless --infilter=text --convert-to pdf file.csv
---
pdftk in.pdf output out.pdf user_pw password
---
iconv -f utf8 -t asciiTRANSLIT /tmp/t.txt
---
qpdf -password=<your-password> -decrypt /path/to/secured.pdf out.pdf
---
sudo gem install typogen sudo xargs typogen <&0
---
dbus-monitor --system dbus-monitor --session grep . -r /sys/firmware/acpi/interrupts/
echo "disable" > /sys/firmware/acpi/interrupts/gpe50
---
from importlib import reload
---
exiftool -all= image.jpg
---
f=filename; (tar --create $f > /run/shm/$f.tar); lzip /run/shm/$f.tar; rm -vf /run/shm/$f.tar; gpg --symmetric /run/shm/$f.tar.lz; mv /run/shm/$f.tar.lz.gpg .; rm -vf /run/shm/$f.tar.lz;
tar xovf filename.tar.lz --lzip
---
find . -print0
| xargs -0 cmd |
find -print -exec cmd '{}' \;
---
to make a hard drive spin down (go to sleep):
to make gpg-agent forget everything (i think):
echo RELOADAGENT
| gpg-connect-agent |
to tell gpg-agent to reload .gnupg/gpg-agent.conf:
pkill -SIGHUP gpg-agent
---
hdparm -S 6 /dev/sdb
---
dropbox exclude
---
sudo ifconfig wlp2s0 down
sudo rmmod cfg80211 mwifiex mwifiex_pcie sudo rmmod cfg80211 mwifiex mwifiex_pcie sudo rmmod cfg80211 mwifiex mwifiex_pcie sudo rmmod cfg80211 mwifiex mwifiex_pcie
sudo modprobe cfg80211 sudo modprobe mwifiex sudo modprobe mwifiex_pcie
sudo ifconfig wlp2s0 up
---
xrdb -merge ~/.Xresources
---
to install a .deb from a slightly untrusted source but not run the postinstall (because you don't want them running anything with root access):
apt-get download <package> sudo dpkg --unpack <package>*.deb sudo rm /var/lib/dpkg/info/<package>.postinst -f sudo dpkg --configure <package> sudo apt-get install -yf #To fix dependencies
---
sudo systemctl status sudo systemctl start sudo systemctl stop sudo systemctl is-enabled sudo systemctl enable sudo systemctl disable
more at [1]
---
cd ~/newwebsite; hugo hugo serve& cd ~/newwebsite; hugo; find public -type d -exec chmod 755 {} +; chmod -R a+r public; scp -rp ~/newwebsite/public/* web:; cd -
---
in emacs, to convert OddMuse? style link markup to Asciidoc style link markup:
(we use curly braces, which is not asciidoc syntax, only temporarily so that they don't interfere with the next regexp)
(now get rid of the temporary curly braces)
also, put blank lines immediately before lists if the lists are preceded by ordinary text (instead of headers), and replace raw image URLs with image:URL[alt text], and replace '----' with
---
in emacs, to convert OddMuse? style link markup to Markup style link markup:
also, change == headings == to # headings, and put blank lines immediately before lists
---
"I use the following incantation when authorizing folks to ssh into my servers via github public keys:
curl https://github.com/[github name].keys >> ~/.ssh/authorized_keys"
---
restarting virtualbox clipboard guest addition
kill `ps -fe
| grep -i clip | grep vbox | head -n1 | awk '{print $2}'`; /usr/bin/VBoxClient? --clipboard |
---
find . -path '*.txt' -print0
| xargs -0 -n1 grep -H -s crossbar |
---
upload to PyPI?:
pip install twine python setup.py sdist bdist_wheel twine upload dist/*
---
python -m virtualenv lets-go . ./lets-go/bin/activate
---
sudo du -schx /* --exclude=/proc --exclude=/sys
| sort -h |
---
force immediate clock sync/time sync/ntp update:
sudo ntpd -qg
---
monitoring bandwidth usage (that works even within virtualbox, even when iptraf doesn't in some cases):
sudo nethogs enp0s3
(where 'enp0s3' is the name of the ethernet adapter)
---
to install something with dpkg and install its dependencies:
"After using dpkg, running the following command helped me to install the dependencies :
sudo apt-get -f install " [2]
---
xrandr --dpi 135
"4.12 Display (xfce4-display-settings), which is vastly improved from 4.10?"
font size and/or DPI setting in /Settings/Appearance/Settings
https://karlgrz.com/ubuntu-unity-changing-from-high-dpi-to-dual-monitors/ http://askubuntu.com/questions/472262/adapt-ubuntu-to-a-high-dpi-resolution-screen
---
xrandr --output LVDS1 --brightness 0.9 xbacklight -set 0
---
securely wipe GNU/Linux files and hard drives:
| xargs -0 -n1 shred -v -n0 -z -u |
dd if=/dev/zero of=/dev/sda bs=1m
---
cd parent_dir (dir=dir; tar -c "$dir"
| lzip -o "$dir.tar") |
---
htop atop iotop iptraf dstat mtr ping traceroute dig tcpdump tshark wireshark
---
sudo clamscan -r -i --cross-fs=no / > /tmp/clamscanlog.txt
---
/l4/backup/sdcard_from_lgd520_sd_ext/data/org.mozilla.firefox/files/mozilla/uunz9v8f.default/browser.db
y'know how there's that 'reading list' in Firefox Android? You want a list of the URLs in it?
They are inside the 'browser.db' file in your profile folder; that is, in:
data/org.mozilla.firefox/files/mozilla/aery5ea9.default/browser.db
where 'aery5ea9.default' is replaced by your profile folder's name. You may or may not need root to be able to access that file, i'm not sure. Anyways, if you can get that file off using adb, then if you install sqlite3, you can do:
sqlite3 browser.db 'select url from reading_list order by added_on;'
to print out a list of URLs in the order that you saved them
---
cat >/etc/polkit-1/rules.d/99-usb-mounting.rules 1