Main /
TipsTips and TricksPython
Create a .pythonrc file containing: import readline
import rlcompleter
import atexit
import os
readline.parse_and_bind("\C-a: complete")
historyPath = os.path.expanduser("~/.pyhistory")
def save_history(historyPath=historyPath):
import readline
readline.write_history_file(historyPath)
if os.path.exists(historyPath):
readline.read_history_file(historyPath)
atexit.register(save_history)
del os, atexit, readline, rlcompleter, save_history, historyPath
and use the following environment: export PYTHONSTARTUP=$HOME/.pythonrc
Bash
export HISTCONTROL=ignoredups
${i/glob_to_replace/replacing_glob}
!first_chars_of_command
!first_chars_of_command:p
mount -o loop -t iso9660 file.iso /media/iso
Others
mencoder -sub subtitle.srt -fontconfig -font Arial -subfont-text-scale 4 -oac mp3lame -lameopts cbr=128 -ovc xvid -xvidencopts bitrate=900 original.avi -o output.avi
CYLINDERS = BYTES / HEADS / SECTOR_BY_TRACKS / SECTOR_SIZE
** dmenu_run -i -nf '#888888' -nb '#222222' -sf '#ffffff' -sb '#285577' |