Set a print preset as the default on a Mac

This is actually a re-hash of a hint first published almost 20 years ago ... on paper ... because there was no MacOSXHints!

Once you've created a Print Preset that suits your needs, save it with a unique name. You'll be able to select it from the Presets popup menu in the Print dialog. But what if you want that to be the default setting? Reaching back into our collective Macintosh memory, hold down the Option key when selecting the Print button and the current Preset will become the default for all apps.

Finally! I was able to get rid of that "reverse order" nonsense! Did you know that, when "reverse order" is checked, printing pages 1 to 2 of a four page document prints pages 3 to 4? Can you say "Left hand doesn't know what the right hand is doing?" How about "Windoze-like !@%$##%!"? I know you can!

Source: http://hints.macworld.com/article.php?story=20040209112703120

How to Set Up a Password-less SSH Login

First, on the local machine you will have to generate a secure SSH key:

ssh-keygen

Next, you need to copy the generated key to the remote server you want to setup passwordless logins with:

cat ~/.ssh/id_dsa.pub | ssh user@remotehost.com 'cat >> ~/.ssh/authorized_keys'

You can now login to the remote SSH server without a password:

ssh user@remotehost.com

Midnight Commander keyboard shortcuts (usefull for Mac users)

It happens that I, some times, access remote linux servers which of I use Midnight Commander, so some usefull key combinations trumps with the Mac shortcuts like Ctrl-Down. Well, in those cases the following shortcuts can be used:

----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
Open same working directory in the inactive panel: Esc + i
Open parent working directory in the inactive panel: Esc + o
Go to top of directory in active pane: Esc + v / Esc + g
Go to bottom of directory in active pane: Esc + j / Ctrl + c
Go to previous directory: Esc + y
Search pop-up: Esc + ?
----- Ctrl -----
Refresh active panel: Ctrl + r
Selecting files and directories: Ctrl + t
Switch active <-> inactive panels: Ctrl + i
Switch active <-> inactive panels content: Ctrl + u
Execute command / Open a directory: Ctrl + j
----- F -----
F1: help
F2: user menu
F3: read file / open directory
F4: edit file
F5: copy file or direcotry
F6: move file or directory
F7: create directory
F8: delete file / directory
F9: open menu bar
F10: exit MC

Copied from: http://pastebin.com/i9kfVKT9

Acentos en impresora de tickets EPSON TM-U220PD

Para modificar la impresora de tickets para que imprima los acentos y símbolos varios en un entorno CUPS, se debe crear un nuevo backend.

Para ello realizar:

1-Instalar el paquete konwert.

sudo apt-get install konwert

2-Modificar la impresora de tickets seleccionando Propiedades. 2.1-Seleccionar la pestaña Conexión. 2.1.1-En el campo URI entrar:

tickets:/dev/lp0

3-Añadir backend tickets en CUPS.

3.1-Crear el archivo: sudo nano /usr/lib/cups/backend/tickets

3.1.1-Añadir el código:

#!/bin/bash
# name: "/usr/lib/cups/backend/tickets"

echo "$0" > /tmp/cupsoutput
echo "$1" >> /tmp/cupsoutput
echo "$2" >> /tmp/cupsoutput
echo "$3" >> /tmp/cupsoutput
echo "$4" >> /tmp/cupsoutput
echo "$5" >> /tmp/cupsoutput
echo "$6" >> /tmp/cupsoutput

# check number of arguments (embodied in $#):
case $# in
0) echo "file pipe \"Unknown\" \"Printing to my own PostScript processing program\""
exit 0
;;
5) INPUT="-"
break
;;
6) INPUT="$6"
break
;;
*) echo "Wrong number of arguments"
echo "Usage: mypipe job-id user title copies options [file]"
exit 1
;;
esac

# do the backend's job:
#cat $INPUT > /path/to/my_program_which_receives_postcript_via_stdin
/usr/lib/cups/filter/iso15tocp437 $1 $2 $3 $4 $5 $6
# Open the drawer
echo -ne "\0033" >> $6
echo -ne "p" >> $6
echo -ne "\0000" >> $6
echo -ne "\0033" >> $6
echo -ne "\0000" >> $6
# Keep a copy of the last printed
cat $6 >> /tmp/cupsoutput

#resend to parallel backend
/usr/lib/cups/backend/parallel $1 $2 $3 $4 $5 $6

3.2-Crear el archivo de filtro: /usr/lib/cups/filter/iso15tocp437

#!/bin/bash
# CUPS filter to convert plain text iso15 to cp437 charset
# Call konvert quietly, securely and with output to stdout
konwert iso15-cp437 "$6" -O