Dienstag, Februar 28, 2012

vim und die Statuszeile

Zunaechst muss sie eingeblendet werden:
set laststatus=2
Danach kann man zB mit dieser hier starten:
set statusline=%t[%{strlen(&fenc)?&fenc:'none'},%{&ff}]%h%m%r%y%=%c,%l/%L\ %P
weiter geht's dann hier.

Dienstag, Februar 14, 2012

mc und entfernte Dateisysteme

Das man mittels
cd ftp://username:password@host.net/path
in mc eine FTP Verbindung aufbauen kann, ist ja schon ein alter Hut. Neu für mich war, das das auch mit scp geht:
cd sh://host/path
Das ganze vermischt mit .ssh/config ergibt einen sehr komfortablen SCP Browser.

Donnerstag, Februar 09, 2012

Linke Alt Taste als Metakey in XTerm definieren

Die Einstellungen für XTerm:
cat >> ~/XTerm<<"EOF"
XTerm*eightBitInput:   false
XTerm*metaSendsEscape: true
EOF
Und für xmodmap:
cat >> ~/.xmodmap<<"EOF"
keysym Alt_L = Meta_L Alt_L
EOF

Html Popups mit CSS

Der Originalbeitrag kommt von psacake.com.

Es wird ein Link ausgenutzt, um die Funktionalitaet bereit zu stellen:
This is the LinkThis is the Popup
Und nun noch der CSS Code:
a.info{
    position:relative; /*this is the key*/
    z-index:24; background-color:#ccc;
    color:#000;
    text-decoration:none}

a.info:hover{z-index:25; background-color:#ff0}

a.info span{display: none}

a.info:hover span{ /*the span will display just on :hover state*/
    display:block;
    position:absolute;
    top:2em; left:2em; width:15em;
    border:1px solid #0cf;
    background-color:#cff; color:#000;
    text-align: center}
ohne-css.gehts-gar.net hat das noch etwas weiter getrieben und eine Grafik integriert:
a.info:hover span
{
display:block;
position:absolute;
top:-60px;
left:300px;
width:234px;
height: 60px;
background: url(grafik.jpg);
}

Montag, Februar 06, 2012

ersetzen eines Strings in allen Dateien

find . -name '*.html' | xargs perl -pi -e 's/oldtext/newtext/g'
oder aber mit
sed -i 's/oldtext/newtext/g' *.html