unsorted commands found while scouring notes from my old laptop
-
Burn Iso Image (old note haven‘t checked up on it yet)
growisofs -dvd-compat -speed=2 -Z /dev/sr0=/home/user/image.iso -
mono somebinary.exe Docker image (old note haven‘t checked, it‘s worked at least once, someday)
1.mono somebinary.exe(Test if the binary works with mono)
2.sudo docker build -t somebinary-dockerimage .(builds the container)
3.sudo docker run somebinary-dockerimage(run the docker container to test it)
4.sudo docker save -o ./somebinary-dockerimage.image somebinary-dockerimage(save the container to a file to upload to nas and start there.) -
serial console
screen /dev/ttyUSB0 115200 -
mount Iphone (another old note, but might be useful someday)
ifuse <mountpoint>
unmount <mountpoint -
*keep a command running in background even if shell is closed:
(( command &) &) -
list the size of all directories and files in the current dir and sort (find where your filespace went)
du -sh -- * | sort -h -
some commands that I wrote down someday
tracepath/mtr
HTTPie/aria2c
ripgrep
exa
fzf
icdiff
pv/progress -
sshfs (mount a folder that you can reach via ssh into your filesystem)
sshfs remotesystem:/path /mnt/mountpointnice install instructions for mac os x (basically it’s
brew cask install osxfuseand thenbrew install sshfs) -
ssh port forwarding
ssh -L 1337:localhost:1337 remotehost(or second hop instead of localhost)
https://localhost:1337(in a browser/app whatever) -
wget one folder (old note haven‘t checked. guess –cut-dirs number has to be exactly how many 📂 hops in the url)
wget -r -nH --cut-dirs=5 -np -R „index.html*“ -e robots=off -
extract windows product key mounted system (old .txt don‘t know where I got it from and if it still works, but it proved useful once, for one of my systems that wouldn‘t boot anymore so I could reinstall using the same key - nowadays the key is in the bios anyway so not needed anymore)
chntpw -e /path/to/windisk/Windows/System32/config/software
dpi \Microsoft\Windows NT\CurrentVersion\DigitalProductId -
(re)generate initrd (old note, I‘m sure there‘s more to it, but for reference and as a starting point)
mkinitcpio -p linux -
check your external ip address (there‘s a lot of ways right now and old note says this)
curl http://bot.whatismyipaddress.com -
rotate your screen (sometimes useful for reading in a4 on laptop)
xrandr --output LVDS1 --rotate right
xrandr --output LVDS1 --rotate normal -
add a second ip address (even in a completely different range) to your card (often useful when configuring new devices which are in a different local lan address range than your stuff is.)
ip address add 10.10.10.1 dev wlp3s0
to see that it worked you can useip -o addr -
copy to/from clipboard
pbcopy < testfile.txt
pbpaste >> somefile.txt
Seems like this is a mac kind of thing. to get the same behaviour on arch you have to install xsel pacman -S xsel and the include the following in your .zshrc:
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
found here
-
nice aur tool
trizen -Ss stringsearch for string in packagenames and descriptionstrizen -S toolnameinstall tool
trizen -R toolnameremove tooltrizen -Syuupdate packages and aur installed aur stuff -
resize images on mac terminal
sips -Z 640 *.jpgresize all jpegs to 640 pixels (height or width whichever is bigger) overwriting the originals keeping aspect ratiosips -Z 1024 original.jpg -o original-1024.jpgsame but only one image and not overwriting but making new file -
convert image to webp on mac terminal
brew install webpto get the command installedcwebp -q 50 somepic.jpg -o somepic.webpeasy as that for quality 50% (warning no safari browser support as of yet (should come with big sur though) and no Internet Explorer but then again that’s a good thing :) -
convert image to jpeg2000 on mac terminal
sips -s format jp2 -s formatOptions 80 original.jpg -o destination.jp2just realize those can only be seen on safari, no other browser support as far as I can see :/