--save
option for creating a config file ~/.ripit/config
.ripit -t http -S standard -D '"$year - $album"' -T '"$tracknum - $artist - $trackname"' --playlist 0 --core 4 -o .
--save
option for creating a config file ~/.ripit/config
.ripit -t http -S standard -D '"$year - $album"' -T '"$tracknum - $artist - $trackname"' --playlist 0 --core 4 -o .
mkdir small
for i in *.JPG; do while [ `ps --no-headers -C convert | wc -l` == "4" ]; do sleep 1; done; convert -quality 95% -resize 30% $i small/$i & done
sudo mlabel -i /dev/sdc1 ::my-label
sudo dosfsck -ar /dev/sdc1
sudo dpkg --get-selections > dpkglist.txt
sudo dpkg --set-selections < dpkglist.txt
sudo apt-get -y update
sudo apt-get dselect-upgrade
test
set terminal postscript eps monochrome enhanced dashed
set output "distplot.eps"
set style data linespoints
set title "Minimum Distance"
set xlabel "m"
set ylabel "toroidal minimum distance"
set logscale xy 2
plot "mindists.dat" using 1:2 title "Sobol'", "mindists.dat" using 1:3 lt 3 title "Larcher-Pillichshammer"
plot 'force.dat' using 1:($3-$2)
plot 'force.dat' using (3*$2):(sin($3+$1))
set multiplot
# common margins
set lmargin 10
set rmargin 2
# common y-range
set yrange [0:1.3e+9]
plot "values.dat" using 1:2 title "f1"
plot "values.dat" using 1:3 lt 3 title "f2"
...
clear
unset multiplot
convert(12345, binary);
convert(11000000111001, decimal, binary);
sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update
sudo apt-get install acroread
mkisofs -r -l -J -V "label" data/ | cdrecord -driveropts=burnfree -v dev=/dev/cdrom1 -
cdrecord -driveropts=burnfree -v dev=/dev/cdrom1 img.iso
mkisofs -r -l -J -V "label" -o img.iso data/
mount -o loop img.iso /mnt/iso
growisofs -l -Z /dev/dvd -V "label" -R -J data/
growisofs -dvd-compat -Z /dev/dvd=img.iso
mkisofs -dvd-video -o img.iso /path/to/dvd/filesystem/
sudo chmod u+s /sbin/shutdown
shutdown
without sudo
.sudo visudo
%admin ALL=NOPASSWD: /sbin/shutdown
sudo shutdown
without the password prompt.
mkdir install
CXXFLAGS="-O2 -mcpu=xscale -mtune=xscale" ./configure --prefix=`pwd`/install
--enable-debug=no
make
make install
mkdir install
PKG_CONFIG_PATH=/home/leo/rtorrent/libtorrent-0.11.8/install/lib/pkgconfig
CXXFLAGS="-O2 -mcpu=xscale -mtune=xscale"
./configure --prefix=`pwd`/install --enable-debug=no
make
make install
MTHREAD="--multi-thread 2"
in tovid
to MTHREAD="--multi-thread 4"
for quadcore. However, the number of threads may not exceed 4.PATH=~/soft/tovid/tovid-0.31/install/bin:$PATH tovid -dvd -pal -fit 4300 -parallel -noask -in input.avi -out output
use makexml and makedisc as stated in tovid output to generate dvd structure from mpg / burn the disc:PATH=~/soft/tovid/tovid-0.31/install/bin:$PATH makexml output.mpg -out MyDisc
PATH=~/soft/tovid/tovid-0.31/install/bin:$PATH
makedvd -burn -label "my movie" MyDisc.xml
#!/usr/bin/env python
import sys
import os
import re
assert len(sys.argv) > 3
artist = sys.argv[1]
album = sys.argv[2]
for s in sys.argv[2:]:
m = re.match(r'(\d\d) - ([^\.]*).mp3', s)
if not m:
print 'could not find match for', s
continue
track = m.group(1)
title = m.group(2)
cmd = 'id3v2 -a "%s" -A "%s" -T %s -t "%s" "%s"' % (artist, album, track, title, s)
print cmd
os.system(cmd)
vlc --freetype-fontsize=20 --sub-margin 60 -I lirc movie.avi
#########
# Mplayer
begin
prog = mplayer
button = OK
config = pause
end
begin
prog = mplayer
button = VolUp
config = volume +1
repeat = 1
end
begin
prog = mplayer
button = VolDown
config = volume -1
repeat = 1
end
begin
prog = mplayer
button = ChanUp
config = sub_delay +0.1
repeat = 1
end
begin
prog = mplayer
button = ChanDown
config = sub_delay -0.1
repeat = 1
end
begin
prog = mplayer
button = forward
config = seek +20 0
end
begin
prog = mplayer
button = rewind
config = seek -20 0
end
begin
prog = mplayer
button = skip
config = seek +600 0
end
begin
prog = mplayer
button = replay
config = seek -600 0
end
begin
prog = mplayer
button = pause
config = pause
end
begin
prog = mplayer
button = up
config = seek +60 0
end
begin
prog = mplayer
button = right
config = seek +10 0
end
begin
prog = mplayer
button = down
config = seek -60 0
end
begin
prog = mplayer
button = left
config = seek -10 0
end
begin
prog = mplayer
button = enter
config = pause
end
begin
prog = mplayer
button = mute
config = mute
end
begin
prog = mplayer
button = play
config = pause
end
begin
prog = mplayer
button = power
config = quit
end
begin
prog = mplayer
button = stop
config = pause
end
begin
prog = mplayer
button = home
config = vo_fullscreen
end
begin
prog = mplayer
button = more
config = osd
end
begin
prog = mplayer
button = back
config = sub_visibility
end
#####
# vlc
begin
prog = vlc
button = OK
config = key-play-pause
end
begin
prog = vlc
button = VolUp
config = key-vol-up
repeat = 1
end
begin
prog = vlc
button = VolDown
config = key-vol-down
repeat = 1
end
begin
prog = vlc
button = forward
config = key-jump+medium
end
begin
prog = vlc
button = rewind
config = key-jump-medium
end
begin
prog = vlc
button = skip
config = key-jump+long
end
begin
prog = vlc
button = replay
config = key-jump-long
end
begin
prog = vlc
button = pause
config = key-play-pause
end
begin
prog = vlc
button = up
config = key-jump+medium
end
begin
prog = vlc
button = right
config = key-jump+short
end
begin
prog = vlc
button = down
config = key-jump-medium
end
begin
prog = vlc
button = left
config = key-jump-short
end
begin
prog = vlc
button = enter
config = key-play-pause
end
begin
prog = vlc
button = mute
config = key-vol-mute
end
begin
prog = vlc
button = play
config = key-play-pause
end
begin
prog = vlc
button = power
config = key-quit
end
begin
prog = vlc
button = stop
config = key-play-pause
end
begin
prog = vlc
button = home
config = key-fullscreen
end
begin
prog = vlc
button = back
config = key-crop
end
begin
prog = vlc
button = more
config = key-aspect-ratio
end
begin
prog = vlc
button = ChanUp
config = key-audio-track
end
begin
prog = vlc
button = ChanDown
config = key-subtitle-track
end
#!/bin/bash
while true
do
mplayer http://mp3stream1.apasf.apa.at:8000/listen.pls
sleep 1
done
#!/bin/bash
curl http://wstreaming.zdf.de/zdf/veryhigh/`date +%y%m%d`_h19.asx | grep mms: | cut -d\" -f2 | xargs -n1 mplayer -dumpstream -dumpfile ~/tmp/heute.wmv
wait $pid
while kill -0 $pid > /dev/null; do sleep 1; done
sudo vim /etc/udev/rules.d/70-persistent-net.rules
sudo apt-get install debhelper fakeroot
sudo /usr/share/doc/libdvdread3/install-css.sh
fontconfig=yes
font='Bitstream Vera Sans'
subfont-text-scale=2
vo=gl:yuv=3:lscale=1:cscale=1
dr=yes
framedrop=yes
stop-xscreensaver=yes
fs=yes
double=yes
spualign=2
monitoraspect=16:10
nvidia-settings --load-config-only
#!/bin/bash
DESTDIR=$1
PRESET=$2
if test "x$PRESET" = "x"; then
PRESET=standard
fi
if test "x$DESTDIR" = "x"; then
DESTDIR=.
else
mkdir -p "$DESTDIR"
fi
echo
echo "Preset=$PRESET Destination=$DESTDIR Source=`pwd`"
echo
for a in *.flac
do
OUTF=`echo "$a" | sed s/\.flac/.mp3/g`
echo
echo "Source=`pwd`/$a Destination=$DESTDIR/$OUTF"
echo
ARTIST=`metaflac "$a" --show-tag=ARTIST | sed s/.*=//g`
TITLE=`metaflac "$a" --show-tag=TITLE | sed s/.*=//g`
ALBUM=`metaflac "$a" --show-tag=ALBUM | sed s/.*=//g`
GENRE=`metaflac "$a" --show-tag=GENRE | sed s/.*=//g`
TRACKNUMBER=`metaflac "$a" --show-tag=TRACKNUMBER | sed s/.*=//g`
YEAR=`metaflac "$a" --show-tag=DATE | sed s/.*=//g | cut -b -4`
echo
echo "Launching: flac -c -d $a | lame --preset $PRESET - $DESTDIR/$OUTF"
echo
flac -c -d "$a" | lame --preset $PRESET - "$DESTDIR/$OUTF"
echo
echo "Setting id3 ($TITLE, $TRACKNUMBER, $ARTIST, $ALBUM, $GENRE, $YEAR)"
echo
if test "x$TITLE" != "x"; then
id3v2 -t "$TITLE" "$DESTDIR/$OUTF" > /dev/null
fi
if test "x$TRACKNUMBER" != "x"; then
id3v2 -T "$TRACKNUMBER" "$DESTDIR/$OUTF" > /dev/null
fi
if test "x$ARTIST" != "x"; then
id3v2 -a "$ARTIST" "$DESTDIR/$OUTF" > /dev/null
fi
if test "x$ALBUM" != "x"; then
id3v2 -A "$ALBUM" "$DESTDIR/$OUTF" > /dev/null
fi
if test "x$GENRE" != "x"; then
id3v2 -g "$GENRE" "$DESTDIR/$OUTF"
fi
if test "x$YEAR" != "x"; then
id3v2 -y "$YEAR" "$DESTDIR/$OUTF"
fi
done
wget http://download2.citrix.com/files/en/products/nfr/ica/setup.class
java setup
java -cp JICAEngJ.jar com.citrix.pn
java -cp JICAEngJ.jar com.citrix.JICA uni-bib
set term postscript eps enhanced color "NimbusSanL-Regu,17" fontfile "/usr/share/texmf-texlive/fonts/type1/urw/helvetic/uhvr8a.pfb"
set output 'histogram.eps'
epstopdf histogram.eps
verification:
pdffonts histogram.pdf
sudo apt-get install checkgmail libextutils-depends-perl libextutils-pkgconfig-perl libsexy2 libsexy-dev
sudo perl -MCPAN -e 'install Gtk2::Sexy'
sudo perl -MCPAN -e 'install Crypt::Simple'
sudo ln -s bin.IBM_INTEL_LINUX bin.X86_64_LINUX
sudo ln -s jre.IBM_INTEL_LINUX jre.X86_64_LINUX
__GL_SYNC_TO_VBLANK=1 __GL_FSAA_MODE=9 __GL_LOG_MAX_ANISO=3 /.doom3
sudo apt-get install apt-file
sudo apt-get install gkrellm lm-sensors
sudo sensors-detect
sudo echo coretemp >> /etc/modules
sudo modprobe coretemp
Thanks to xemacs for his update!
### Get and unpack the font archive
wget http://tug.ctan.org/fonts/LuxiMono.zip
unzip LuxiMono.zip
cd LuxiMono
### Install the files and call the font tools for the system
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/fonts/type1/public/luxi
sudo cp *.pfb `kpsexpand '$TEXMFLOCAL'`/fonts/type1/public/luxi
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/fonts/afm/public/luxi
sudo cp *.afm `kpsexpand '$TEXMFLOCAL'`/fonts/afm/public/luxi
sudo unzip -d `kpsexpand '$TEXMFLOCAL'` ul9.zip
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/fonts/map/dvips/luxi
sudo mv `kpsexpand '$TEXMFLOCAL'`/dvips/config/ul9.map `kpsexpand '$TEXMFLOCAL'`/fonts/map/dvips/luxi
sudo rm -rf `kpsexpand '$TEXMFLOCAL'`/dvips
sudo texhash
sudo updmap-sys --enable Map ul9.map
### Clean up ...
cd ..
rm -rf LuxiMono
font_mem_size = 500000
ls > out 2>&1
/usr/bin/time -a -o timinigs ./my-program
-o number-up=4 -o number-up-layout=rlbt
-o number-up=4 -o number-up-layout=btlr
tar xfzv l_cc_p_10.0.023_ia32.tar.gz
sudo apt-get install alien
cd l_cc_p_10.0.023_ia32/data
sudo alien -cv intel-icc100023-10.0.023-1.i386.rpm
sudo dpkg -i intel-icc100023_10.0.023-2_i386.deb
sudo mkdir -p /opt/intel/licenses
sudo cp ~/NCOM_L_CMP_CPP_NB96-WLC77F6B.lic /opt/intel/licenses
cd /opt/intel/cc/10.0.023/bin
sudo perl -pi -w -e 's/!\/bin\/sh/!\/bin\/bash/g;' *.sh icpc icc
sudo perl -pi -w -e 's/<INSTALLDIR>/\/opt\/intel\/cc\/10.0.023/g;' *.sh icpc icc
source /opt/intel/cc/10.0.023/bin/iccvars.sh
export LANG=C
sudo apt-get install lcdf-typetools
otfinfo -v /opt/acrobat/Resource/Font/MinionPro-Regular.otf
/usr/lib32/Adobe/Reader8/Resource/Font
wget ftp://dante.ctan.org/tex-archive/fonts/minionpro/scripts.zip ftp://dante.ctan.org/tex-archive/fonts/minionpro/enc-2.000.zip ftp://dante.ctan.org/tex-archive/fonts/minionpro/metrics-base.zip
unzip scripts.zip
cp /opt/acrobat/Resource/Font/MinionPro* otf
./convert.sh
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/fonts/type1/adobe/MinionPro
sudo cp pfb/*.pfb `kpsexpand '$TEXMFLOCAL'`/fonts/type1/adobe/MinionPro
sudo unzip -d `kpsexpand '$TEXMFLOCAL'` metrics-base.zip
sudo unzip -d `kpsexpand '$TEXMFLOCAL'` enc-2.000.zip
sudo texhash
sudo updmap-sys --enable Map MinionPro.map
acroread `kpsexpand '$TEXMFLOCAL'`/doc/latex/MinionPro/MinionPro.pdf
wget ftp://tug.ctan.org/pub/tex-archive/fonts/mnsymbol.zip
unzip mnsymbol.zip
cd mnsymbol/tex
latex MnSymbol.ins
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/tex/latex/MnSymbol
sudo cp MnSymbol.sty `kpsexpand '$TEXMFLOCAL'`/tex/latex/MnSymbol
cd ..
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/fonts/source/public/MnSymbol
sudo cp -R source/* `kpsexpand '$TEXMFLOCAL'`/fonts/source/public/MnSymbol
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/doc/latex/MnSymbol
sudo cp MnSymbol.ps MnSymbol.pdf README `kpsexpand '$TEXMFLOCAL'`/doc/latex/MnSymbol
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/fonts/map/dvips/MnSymbol
sudo cp enc/MnSymbol.map `kpsexpand '$TEXMFLOCAL'`/fonts/map/dvips/MnSymbol
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/fonts/enc/dvips/MnSymbol
sudo cp enc/*.enc `kpsexpand '$TEXMFLOCAL'`/fonts/enc/dvips/MnSymbol
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/fonts/type1/public/MnSymbol
sudo cp pfb/*.pfb `kpsexpand '$TEXMFLOCAL'`/fonts/type1/public/MnSymbol
sudo mkdir -p `kpsexpand '$TEXMFLOCAL'`/fonts/tfm/public/MnSymbol
sudo cp tfm/* `kpsexpand '$TEXMFLOCAL'`/fonts/tfm/public/MnSymbol
sudo texhash
sudo updmap-sys --enable MixedMap MnSymbol.map
cp /opt/acrobat/Resource/Font/MyriadPro-* otf/
./convert.sh
wget faq.ktug.or.kr/wiki/uploads/MyriadProAR7.pdf faq.ktug.or.kr/wiki/uploads/MyriadProAR7.zip
mkdir myriad
cd myriad
unzip ../MyriadProAR7.zip
mv fonts/tfm/Adobe fonts/tfm/adobe
mv fonts/type1/Adobe fonts/type1/adobe
mkdir fonts/enc
mv dvips fonts/enc/
mkdir -p fonts/map/dvips/Myriad
mv fonts/enc/dvips/MyriadPro/MyriadPro.map fonts/map/dvips/Myriad/
cp ../pfb/MyriadPro-* fonts/type1/adobe/MyriadPro
sudo cp -R * `kpsexpand '$TEXMFLOCAL'`
sudo texhash
sudo updmap-sys --enable Map MyriadPro.map
\usepackage[T1]{fontenc}
\usepackage{textcomp}
% Minion and Myriad fonts
\usepackage[minionint,mathlf]{MinionPro}
\renewcommand{\sfdefault}{Myriad-LF}
vlc dvd:/dev/dvd@1 --sout "#standard{access=file,mux=ps,dst=output.ps}"
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\C-H": backward-kill-word
"\e[3;5~": kill-word
set bell-style none
set editing-mode vi
set keymap vi
man readline
, inputrc)
perl -pi -w -e 's/search/replace/g;' *
import sys
search = 'search over
multiple lines'
replace = 'replace with
this string'
for i in sys.argv[1:]:
f = open(i, 'r')
s = f.read()
f.close()
f = open(i, 'w')
f.write(s.replace(search, replace))
f.close()
#!/bin/bash
# check for root
if [ `id -u` != 0 ]
then
echo "this script should be run as root:"
echo " sudo screen $0"
read -p "press [enter] to abort..." cd
exit 1
fi
echo "remember to run this inside screen."
read -p "press [enter] to continue..." cd
echo "dumping mysql database..."
mysqldump -u root --all-databases | bzip2 > ~/all_databases.sql.bz2
echo "starting backup. you will need to enter the password for leo@photon."
sudo tar cjf - --exclude=/tmp --exclude=/var/tmp --exclude=/lost+found --exclude=/proc --exclude=/sys --exclude=/mnt --exclude /media --exclude /home/leo/backup-photon / | ssh leo@photon "cat > ~/backup-nslu2/backup-nslu2_`date +%y-%m-%d`.tar.bz2"
crontab -e
0 0 * * 6 echo "backup reminder" | mail -s "backup reminder" someone@googlemail.com
ls | xargs -d '\n' touch
find -name "*.mp3" | sort | xargs -d '\n' mplayer
apt-get install apache2 subversion libapache2-svn libapache2-mod-php5 libapache2-svn
# <Location URL> ... </Location>
# URL controls how the repository appears to the outside world.
# In this example clients access the repository as http://hostname/svn/
# Note, a literal /svn should NOT exist in your document root.
<Location /svn>
# Uncomment this to enable the repository
DAV svn
# Set this to the path to your repository
#SVNPath /var/lib/svn
# Alternatively, use SVNParentPath if you have multiple repositories under
# under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...).
# You need either SVNPath and SVNParentPath, but not both.
SVNParentPath /var/lib/svn
# Access control is done at 3 levels: (1) Apache authentication, via
# any of several methods. A "Basic Auth" section is commented out
# below. (2) Apache <Limit> and <LimitExcept>, also commented out
# below. (3) mod_authz_svn is a svn-specific authorization module
# which offers fine-grained read/write access control for paths
# within a repository. (The first two layers are coarse-grained; you
# can only enable/disable access to an entire repository.) Note that
# mod_authz_svn is noticeably slower than the other two layers, so if
# you don't need the fine-grained control, don't configure it.
# Basic Authentication is repository-wide. It is not secure unless
# you are using https. See the 'htpasswd' command to create and
# manage the password file - and the documentation for the
# 'auth_basic' and 'authn_file' modules, which you will need for this
# (enable them with 'a2enmod').
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
# To enable authorization via mod_authz_svn
AuthzSVNAccessFile /etc/apache2/dav_svn.authz
# The following three lines allow anonymous read, but make
# committers authenticate themselves. It requires the 'authz_user'
# module (enable it with 'a2enmod').
#<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
#</LimitExcept>
</Location>
htpasswd -c /etc/apache2/dav_svn.passwd <username>
chown www-data.www-data /etc/apache2/dav_svn.passwd
mkdir /var/lib/svn
chown www-data.www-data /var/lib/svn
svnadmin create /var/lib/svn/<repository>
chown -R www-data.www-data /var/lib/svn/<repository>
[groups]
admin = foo
devs = foo, bar
[/]
@admin = rw
[myrepo:/]
@devs = rw
someone = r
cd /my/path/to/myproject
svn import --username <user> . http://my.domain/svn/<repository> -m "initial import"
svn co --username <user> http://my.domain/svn/<repository>
$locwebsvnhttp = '/wsvn';
$config->parentPath('/var/lib/svn');
$config->setTemplatePath("$locwebsvnreal/templates/BlueGrey/");
$config->useMultiViews();
$config->useAuthenticationFile('/etc/apache2/dav_svn.authz');
$config->allowDownload();
$config->useEnscript();
$config->expandTabsBy(4);
$config->setMinDownloadLevel(0);
$config->hideRSS();
apt-get install enscript
chown -R www-data:www-data cache
# Location for WebSVN Interface
# the '/' behind /wsvn/ is important!!!
<Location /wsvn/>
Options MultiViews
DirectoryIndex wsvn.php
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
/etc/init.d/apache2 force-reload
svn revert --recursive .
pid=/var/run/ddclient.pid
protocol=dyndns2
use=web, web=checkip.dyndns.org
server=members.dyndns.org
login=my-username
password='my-password'
wildcard=yes
photon123.dyndns.org
sudo apt-get install ca-certificates
account default
host smtp.gmail.com
port 587
from my.account@googlemail.com
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user my.account@googlemail.com
password my.password
sudo apt-get install mailx
set sendmail="/usr/bin/msmtp"
| mailx -s "Local mail on nslu2" someone@googlemail.com
leo
set sendmail="/usr/bin/msmtp"
set use_from=yes
set from="my name <my.name@somewhere.com>"
REPLYTO="reply@here.com" mutt -s "test subject" -a attach.pdf -c carboncopy@somewhere.com address1@here.com address2@there.com < message.txt
sudo apt-get install samba smbfs
[...]
security = user
username map = /etc/samba/smbusers
map to guest = bad user
guest account = nobody
[...]
[some-share]
path = /media/some-share
available = yes
browseable = yes
read only = no
valid users = leo
guest ok = no
sudo smbpasswd -a username
/etc/samba/smbusers:username = "username"
sudo testparm
sudo /etc/init.d/samba reload
//computer-name/some-share /media/some-share smbfs credentials=/home/leo/.smbpasswd,rw,exec,auto,uid=leo,gid=leo 0 0
ssh-keygen -t dsa
cat id_dsa.pub >> ~/.ssh/authorized_keys2
set nocompatible
syntax on " syntax highlighting
"colorscheme developer
" font
"set guifont=Bitstream\ Vera\ Sans\ Mono\ 9
" indenting
set smartindent
set autoindent
set smarttab
set ic " ignore case in search
set incsearch " incremental search
set hlsearch " highlight search results
set smartcase " ignore case when lowercase
" expand tabs
set tabstop=8
set shiftwidth=4
set expandtab
" don't insert comment leader automatically on new line
autocmd BufRead,BufNewFile * set formatoptions-=cro
" don't want comments at the beginning of the line in python
au BufNewFile,BufRead *.py set nocindent
au BufNewFile,BufRead *.py set nosmartindent
au BufNewFile,BufRead *.py set autoindent
" don't want strange indenting for LaTeX files
au BufNewFile,BufRead *.tex set nosmartindent
" treat SConstruct as python
au BufNewFile,BufRead SConstruct set filetype=python
" underscore as word delimiter
"set iskeyword-=_
" show full path of file
:map 1
" don't jump over text-wrapped lines
map j gj
map k gk
" Turn of highlighting after a search
map ,, :nohl
" compilation
map :make!
map :cp
map :cn
" rewrap current paragraph
map {gq}
" backup options
set backupdir=~/tmp " backups (~)
set directory=~/tmp " swap files
set backup " enable backups
" change directory automatically
set autochdir
" filename auto completion
set wildmode=longest:full
set wildmenu
" show line numbers
set ruler
" delete to the left in insert mode with backspace
set backspace=indent,eol,start
" always have some lines of text when scrolling
set scrolloff=5
" ctags tutorial
" http://www.vim.org/tips/tip.php?tip_id=94
" omnicpp auto completion
" http://www.vim.org/scripts/script.php?script_id=1520
"filetype plugin on
" create ctags
"map :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .
" no automatic popup for '.', '->'
"let OmniCpp_MayCompleteDot = 0
"let OmniCpp_MayCompleteArrow = 0
" other stuff
"let OmniCpp_LocalSearchDecl = 1
"let OmniCpp_ShowPrototypeInAbbr = 1
" close preview window automatically
"autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
"autocmd InsertLeave * if pumvisible() == 0|pclose|endif
" use STL sources using the _GLIBCXX_STD macro
"let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
" use system-wide tags created with
" ctags -R --c++-kinds=+p --fields=+iaS --extra=+q -o ~/system.tags /usr/include
"set tags+=~/system.tags
" no menu / toolbar / scrollbars
set guioptions-=r
set guioptions-=l
set guioptions-=m
set guioptions-=T
" stop blinking cursor
set guicursor=a:blinkon0
" Use Caps_Lock as Escape
" --- add to ~/.Xmodmap: ---
" remove Lock = Caps_Lock
" keysym Caps_Lock = Escape
echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'
echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'
echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\).\([0-9]*\)\|\(.*\)/\1\2\3/g'
export LD_PRELOAD=/opt/acroread/libgtk2.0-0_2.10.11/usr/lib/libgtk-x11-2.0.so.0.1000.11
sudo rm /opt/acroread/Reader/intellinux/plug_ins/PPKLite.api
mplayer -dvd-device mnt -vo null -ao null -frames 0 -identify dvd://1
mplayer -dvd-device mnt -vf pp=l5,expand=0:-50 -sid 0 -spualign 2 dvd://1
__GL_FSAA_MODE=5 ./quake3.x86 -
seta r_customwidth "1680"
seta r_customheight "1050"
seta r_mode "-1"
apt-get install libpam-opie opie-server opie-client
#@include common-auth
auth sufficient pam_opie.so
auth sufficient pam_unix.so nullok_secure
auth require pam_deny.so
#ChallengeResponseAuthentication no
opiepasswd -c -f
opiekey -n 20 430 ph0650 | tac > list
fdisk -l
cfdisk
sudo cryptsetup luksFormat -c aes-cbc-essiv:sha256 -s 256 /dev/sda1
sudo cryptsetup luksOpen /dev/sda1 encrypted
sudo mkfs.ext3 /dev/mapper/encrypted
sudo mkdir /media/encrypted
sudo mount /dev/mapper/encrypted /media/encrypted
sudo chown leo.leo /media/encrypted
sudo chmod 770 /media/encrypted
sudo cryptsetup luksOpen /dev/sda1 encrypted
sudo mount /dev/mapper/encrypted /media/encrypted
sudo umount /media/encrypted
sudo cryptsetup luksClose encrypted
dd if=/dev/urandom of=/media/USB-STICK/crypto bs=1M count=100
sudo losetup /dev/loop0 /media/USB-STICK/crypto
sudo cryptsetup -c aes-cbc-essiv:sha256 -s 256 --verify-passphrase luksFormat /dev/loop0
sudo cryptsetup luksOpen /dev/loop0 crypto
sudo mkfs.ext3 /dev/mapper/crypto
sudo mkdir /media/crypto
sudo mount /dev/mapper/crypto /media/crypto
sudo chown leo.leo /media/crypto
sudo chmod 770 /media/crypto
sudo losetup /dev/loop0 /media/USB-STICK/crypto
sudo cryptsetup luksOpen /dev/loop0 crypto
sudo mount /dev/mapper/crypto /media/crypto
sudo umount /media/crypto
sudo cryptsetup luksClose crypto
sudo losetup -d /dev/loop0
sudo losetup -f
. For example with wubi Ubuntu, only /dev/loop1 seems to work).
C-a Esc
to enter copy modePageUp, PageDown
to scrollEsc
to abort copy modeC-a
to program: C-a a
<code>
and </code>
tags in HTML mode.for i in *.pdf; do xpdf "$i"; done
<pre>
and </pre>
.