Change extension to multiple files

Change extension to multiple files

for i in *.pdf; do mv $i ${i/pdf/jpg}; done

Continue reading →

How to redirect stderr and stdout in Bash

How to redirect stderr and stdout in Bash

do_something 2>&1 | tee -a some_file

Continue reading →

ssh local tunneling – access home from remote location

ssh local tunneling – access home from remote location

Let’s say you have a raspberry running at home and you want to access it from your office. If you have a google router you can easily set up IPv4 port forwarding 2222 -> 22 At this point from the office you can ssh -p…

Continue reading →

Tesla model 3: ecall emergency call system needs service on tesla

Tesla model 3: ecall emergency call system needs service on tesla

Description: An error shows up on the screen: _ecall emergency call system needs service_ Solution: Within ten seconds: a. Press the SOS call button in the roof of the car and cancel the call immediately on the screen. b. Hard reboot the car by pressing…

Continue reading →

Tesla referral code – free supercharging

Tesla referral code – free supercharging

https://ts.la/erich16605 You get 1.500 7.500km of free Supercharging (until May 28th) when you purchase a new Tesla

Continue reading →

sjekke om det er feil på telenor bredbånd

sjekke om det er feil på telenor bredbånd

ringe: 915 09 000, kryss av: trykk 2, 1, 2 kryss av: https://www.telenor.no/privat/minesider/open/driftsmelding/driftsmeldinger.cms

Continue reading →

How to take MySql dump (backups)

How to take MySql dump (backups)

mysqldump –add-drop-table -a -u username -p database | gzip > prod-db-dump.sql.gz Note: The password is not passed to the command line, but it will asked at the prompt

Continue reading →

How to delete Quicklook thumbnails on Mac

How to delete Quicklook thumbnails on Mac

Long story short: Apple saves the thumbnails that you see with quicklook, even if you delete the original. If you see the images stored into an external drive and then unmount it, you might think, “hey I am safe”. Well, apparently you are not. So…

Continue reading →

Preserve bash history in multiple terminals

Preserve bash history in multiple terminals

dd the following to ~/.bashrc # Avoid duplicates export HISTCONTROL=ignoredups:erasedups # When the shell exits, append to the history file instead of overwriting it shopt -s histappend # After each command, append to the history file and reread it export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history…

Continue reading →

How to take mysql dump

How to take mysql dump

mysqldump –add-drop-table -a -u <user> -p <dbname> | gzip > db-dump.sql.gz

Continue reading →

Page 1 of 15 1 2 3 4 5 ... Last →