An introduction to the pg_auto_failover project

“Postgres is awesome, makes developping my application so much easier, it solves so many problems for me!” and the next step “so, how do I run Postgres in Production?”. If you’re not sure how to bridge that gap yourself, how to deploy your first production system with automated failover, then pg_auto_failover is for you.

Source: An introduction to the pg_auto_failover project

I may need it someday

Padella rivestita Olav

Può essere rivestita

Se la tua padella si graffia, non devi buttarla, puoi semplicemente prenotare il nostro servizio di rivestimento. Riceverai un’etichetta di spedizione con la quale potrai spedire la tua padella, noi rinnoveremo il rivestimento e te la rispediremo indietro. Il servizio costa solo 35€. La spedizione è ovviamente gratuita.

Siamo contrari al consumo usa e getta e vogliamo offrire prodotti di alta qualità, che durino nel tempo. In questo modo contribuiamo a proteggere il ambiente, limitando i rifiuti nelle nostre discariche. Sebbene questo servizio possa sembrare sconveniente per un’azienda che produce utensili da cucina, lo abbiamo realizzato per permettere ai nostri clienti di cucinare per sempre con la loro padella Olav.

Source: Padella rivestita Olav

Chissà se esistono servizi di ricopertura per padelle generiche

Very useful and not much known Linux commands that you probably aren’t using in your daily life

  • redo the last command but as root
sudo !!
  • open an editor to run a command (probably a long one)
ctrl + x + e
  • create a super-fast disk for IO dependant task to run on it
mkdir -p /mnt/ramdisk && mount -t tmpfs tmpfs /mnt/ramdisk -o size=8192M
  • don’t add the command to the history (add one space in front of the command)
 ls -l
history # check the history
  • Fix or change a really long command that you run last with a text editor
fc
  • create a tunnel with SSH to port that is not open to the public (local port 8080 -> remote host’s 127.0.0.1 on port 6070)
ssh -L 8080:127.0.0.1:6070 root@my-public-server.com -N
  • Log output but not show on the console
cat somefile | tee -a log.txt | cat > /dev/null
  • Exit terminal but leave all processes running
disown -a && exit
  • Clear your terminal without “clear” command
ctrl + l  # L
  • Paste the arguments of the previous command
alt + -
  • Completely clean and clear your terminal
reset
  • Get CPU info quickly
cat /proc/cpuinfo
  • Get memory info quickly
cat /proc/meminfo
  • Find a text in a directory which has a lot of file in it recursively
grep -rn /etc/ -e text_to_find
  • Find files bigger than 100 MB
find -type f -size +100MB -exec ls -lah {} \;

Create a webserver in the current directory to serve files in it

python -m SimpleHTTPServer

Find your public IP

curl ifconfig.me

Get a tree view of folders only 3 level

tree -L 3

Get a tree view of processes

pstree

Use the last command’s arguments

!$