Piero Blog

Thursday, May 12, 2011

Resize btrfs partition and filesystem (on a gpt disk)

This is sooooo easy.

  • sudo umount /mnt/storage1/
  • sudo parted /dev/sde
  • (parted) print
  • (parted) rm 1
  • (parted) mkpart 1 ext2 1049kb 100%
  • (parted) quit
  • sudo mount /mnt/storage1/
  • sudo btrfs filesystem resize max /mnt/storage1/
  • done!

Tuesday, September 07, 2010

Nmap pretty output (xml to html)

maarten@xxx:~$ nmap -A --webxml -oX nmap.xml 192.168.1.0/24

maarten@xxx:~$ xsltproc nmap.xml -o nmap.html

Tuesday, October 27, 2009

Handy windows utils after install

http://ninite.com

Labels:

Wednesday, October 07, 2009

Convert ODT to PDF, working...

unoconv seems to be the best option. Not working on Arch or Ubuntu at the moment.
I'm using go-oo. Get  DocumentConverter.py here http://www.artofsolving.com/opensource/pyodconverter

Now on Ubuntu:

soffice -accept="socket,port=8100;urp;"
python ./DocumentConverter.py ./input.doc ./output.pdf


or
for i in *.doc ; do python ./DocumentConverter.py "$i" "$i.pdf" ; done; 


NUP it up
for i in *.pdf ; do echo  pdfnup --nup 2x2 "$i" ; done;
JOIN them
pdfjoin *2x2.pdf
PRINT
lpr *joined.pdf


Wednesday, September 23, 2009

SSH portforwarding, followed by SMB/CIFS mount. For i.a. ReadyNAS

Something like this in .ssh/config file

  • ssh user@hostname -L 1139:192.168.1.60:139
I use 127.0.0.1:1139 so I don't have to be root for this portforwarding (port <1024).>
  • mount.smbfs //localhost/SHARE ~/mnt/hostname/ -o port=1139,user=SAMBAUSER,rw

Labels: ,

Monday, April 28, 2008

Linux Citrix client under Ubuntu Hardy 8.04

Damn easy...
Citrix client under Ubuntu Hardy 8.04

  1. motif libary for wfcmgr "sudo aptitude install libmotif3"
  2. download linux client from citrix site ...
  3. extract "tar -xvzf en.linuxx86.tar.gz"
  4. install "sudo ./setupwfc"
  5. for certificates, steal them from firefox "sudo cp /usr/share/ca-certificates/mozilla/Equifax_Secure_* /usr/lib/ICAClient/keystore/cacerts/"

Tuesday, February 19, 2008

Windows XP on second hard drive, Linux on the first. Boot fix

I tried to install xp next to my linux. Linux was on hard disk one. I tried to install XP on hard disk two. That's almost inpossible... XP can't find the bootloader e.d. It's just awesome. So I removed disk one and installed XP on disk two (the only disk at that moment). Afterwards I could show my GRUB skills.... This did the trick:

  • title XP
  • rootnoverify (hd1,0)
  • map (hd0) (hd1)
  • map (hd1) (hd0)
  • makeactive
  • chainloader +1