Maven


Mounting DOS HDD image

Posted in Software by arekm on the December 18th, 2011

Mounting dos hdd image, first partition:

mount -o loop,offset=32256 dos-hdd.img dir

I’m using such image to update BIOSes in machines where bios doesn’t fit into floppy image. Such hdd image can be places inside iso image to be booted at virtual or real cdrom.

mkisofs -v -r -T -J –hard-disk-boot -b dos-hdd.img -o ../test.iso .

Tabs, vim and 256 colors – tips

Posted in Software by arekm on the February 18th, 2009

Having tabs and spaces visible as separate entities in vim is very neat feature especially if you use colors to differentiate.

Switch TERM to konsole-256color in kde konsole terminal emulator (or whatever emulator you use – rpm -ql ncurses terminfo | grep 256 for more) and put into .vimrc:


colorscheme darkblue
highlight TabGroup ctermbg=233 guibg=233
match TabGroup /\t/

Now tab characters are a bit brighter than spaces.

How to format your source code files using vim?

Posted in Software by arekm on the March 2nd, 2008

… in a batch mode:

find . -name '*.somepattern' -exec vim -c 'norm gg=GZZ' "{}" ";"

lftp and editing remote files

Posted in Software by arekm on the June 15th, 2007

lftp is a very nice piece of software (for people who like text console).

How to edit remote files? Take a look!


[arekm@tarm ~]$ cat .lftp/rc
alias edit source -e ~/.lftp/edit.sh
[arekm@tarm ~]$ cat .lftp/edit.sh
#!/bin/sh
tempid=$$
echo get $1 -o /tmp/$tempid$1
echo shell vim /tmp/$tempid$1
echo put -E /tmp/$tempid$1 -o $1
[arekm@tarm ~]$ lftp -u arm ftp.somewhere.pl
Password:
lftp arm@ftp.somewhere.pl:~> ls
drwxr-xr-x 2 0 0 4096 Jan 29 20:35 .
drwxr-xr-x 2 0 0 4096 Jan 29 20:35 ..
lftp arm@ftp.somewhere.pl:~> edit test.txt
get: Access failed: 550 Can't open test.txt: No such file or directory

[HERE vim is opened; after saving]

9 bytes transferred
lftp arm@ftp.somewhere.pl:~> rels
drwx---r-x 3 10089 999 50 Jun 15 18:35 .
drwxr-xr-x 2 0 0 4096 Jan 29 20:35 ..
-rw-r--r-- 1 10089 nogroup 9 Jun 15 18:35 test.txt
lftp arm@ftp.somewhere.pl:~> cat test.txt
El test.
10 bytes transferred
lftp arm@ftp.somewhere.pl:~> edit test.txt
9 bytes transferred

[HERE again vim is opened; after saving]

23 bytes transferred
lftp arm@ftp.somewhere.pl:~> cat test.txt
El test.
Small change.
25 bytes transferred
lftp arm@ftp.somewhere.pl:~>

Don’t we all love lftp?

Opera Browser (for Linux) and multimedia

Posted in Linux,Software by arekm on the May 26th, 2007

Did you ever try mplayerplug-in with Opera? It’s very bad. Pure X11, no GUI at all. Fortunately there is plugin rewrite under gecko-mediaplayer name which uses new gnome-mplayer tool. Works nicely with GUI under Opera web browser (of course other browsers like Mozilla are supported) ! Available in PLD Th (testing) as rpm packages.

See screenshot:

gecko-mediaplayer plugin

CVS – System Kontroli Wersji

Posted in Software by arekm on the May 7th, 2000

CVS – System Kontroli Wersji

Arkadiusz Miśkiewicz
$Id: cvs-art.txt,v 1.7 2000/05/07 17:39:00 misiek Exp $Większość dostępnych programów oferowanych użytkownikom Linuksa jest
dziś tworzonych przez duże grupy programistów. Zarządzanie takimi projektami
jak jądro Linuksa, glibc czy XFree86 było by bardzo trudne i uciążliwe gdyby
nie pomysłowi programiści, którzy stworzyli narzędzie CVS.

CVS jest efektywnym systemem kontroli wersji. System zapamiętuje
wszystkie wersje wszystkich plików, które umieścisz w CVSie.

(more…)

GNU gettext z punktu widzenia programisty oraz tłumacza

Posted in Software by arekm on the March 12th, 2000

GNU gettext dla programisty i tłumacza

Arkadiusz Miśkiewicz

$Id: gettext-art.lyx,v 1.1 2000/03/12 21:12:04 misiek Exp $

1 Wprowadzenie

Systemy UNIX, a w szczególności Linux zdobywają coraz większą popularność
na świecie. Linux używany jest zarówno przez wyszkolonych administratorów
jak i początkujących. Kilku programistów wychodząc na przeciw początkującym
użytkownikom nie znającym języka angielskiego stworzyło pakiet GNU
gettext. GNU gettext jest zbiorem aplikacji oraz bibliotek przeznaczonych
do tworzenia programów oraz skryptów potrafiących komunikować się
z użytkownikiem w dowolnym (obsługiwanym) języku.

(more…)