Wednesday, August 26, 2009

VIM tutorial



Basic commads

i
go to insert mode (at cursor position)
I
start editing at the beginning of the line
o
go to insert mode on a new line bellow
O
go to insert mode on a new line above
A
insert at the end of the line
ESC
go to command mode
:wq
write and quite
:q
quite
:q!
quite discarding changes
:12
go to line 12
:$
go to the end of file
$
go to the end of line
^
go to the beginning of the line
0
same as above
yy
copy current line
3 yy
copy three lines
dd
cut current line
p
paste
J
join lines
/robert
search for the word "robert"
n
next occurrence
?robert
search for "robert" in reverse order
u
undo
.
repeat last modification operation
cw
change word
x
delete backwards
w
skip to next word
5w
skip five words
b
skip to the previous word
)
skip to next sentence
(
skip to previous sentence
dw
delete word at the right
db
delete word at left
das
delete current sentence


Monday, December 1, 2008

Mount iso in linux

Run this:
 mount myiso.iso /mnt/iso/ -t iso9660 -o ro,loop=/dev/loop0

Convert bin to iso in linux

In ubuntu:

sudo apt-get install bchunk

Create a file:

sudo gedit /usr/local/bin/bchunkcue

Paste this into the new file:


#!/bin/bash
echo “FILE “”$1.bin” ”BINARY” >> $1.cue
echo ” TRACK 01 MODE1/2352 >> $1.cue
echo ” INDEX 01 00:00:00 >> $1.cue
bchunk $1.bin $1.cue $1_
rm $1.cue


Make it executable:

chmod a+x /usr/local/bin/bchunkcue

Then just run:

bchunkcue filename without the bin extension.

Friday, April 18, 2008

Learning Python

After trying for a long time to choose some more "portable" (then VBScript LOL) programming language to learn, I decided to go for Python. I found very nice free tutorials on the web. I recommend you to start with A Byte of Python which is a very good start for a beginner, thanks Swaroop for your effort to put together such a tutorial. As an alternative, or maybe to get a bit more in depth knowledge you can go for Dive Into Python. After I finish this I want to learn the Django framework in order to start developing some web applications and try Google Apps Engine. However I find Python already useful also as an alternative to VBscript for Windows administration. Microsoft has a few examples of scripts written in Python on their website.

Tuesday, September 4, 2007

Blog world - so much choice

It looks like nowadays every big player in the internet game is trying to get a bigger piece of the pie creating more and more attractive platforms for internet presence, social networking etc. It is difficult to chose. I looked today over Microsoft's Live Spaces and it looks great. The integration with MSN messenger and other MS products, the possibility of synchronizing with my Windows Mobile phone and other advantages coming from having all the platform integrated is very appealing. However I am a partisan of the open standards and even all my work is related to Microsoft I think that being Open is the condition for progress and the future in every field, not only computing.

So why choose Blogger? I have Windows even on my smart phone... The idea is to promote choices.

I pay almost 10USD a month for hosting on a server where I can install whatever I like. I play with Joomla, Wordpress and other systems. I have a site created with Joomla at http://www.boerescu.info. However I find every day that choices from the free area are more and more powerful, with more space, integrated with mail, messengers, and the possibility to be part of social networks with millions of people.

I trust Google's creativity. I am looking forward to see with what they will come up next. keep up the good work.

Thursday, November 9, 2006

Getting back into programming

I intend to get back into some database programming - I did it before with FoxPro. I wanted this to be very different from what I do now so when I read about Oracle XE and Application Express I knew that this is the chance to get my hand on database programming. I do Microsoft SQL 2000 and 2005 installation and administration tasks for a living but Oracle looked more attractive to me because of it is available on any platform and has development tools that are platform independent. Having a choice is a good thing. It’s market share is also impressive: 49% compared with 19% Microsoft SQL and 22% DB2.
I started with reading the documentation for database objects, field types, simple Oracle DBA tasks, then I will get to creating some simple application express programs and then JDeveloper. All on my Linux desktop.

I cannot say that I do not have doubts about choosing Oracle. My work is about Microsoft and with SQL 2005 Microsoft has got a very powerful product. However, choosing something outside my daily work make my motivation stronger, I feel like I do this for myself, for improving myself and not for a job (at least not for the moment). I need something more challenging.

Installing linux on my laptop

My job is mainly the implementation/design and support of Windows based networks. However I follow with much interest the evolution of open source and specially Linux.
Last week I have got a “new” laptop from work. It’s an HP NX5000, Centrino with 1GB of RAM and 40GB disk, all Intel. The first thing I did I formated it and installed XP. I decided not to go for Vista because of compatibility issues I had with my previous laptop, Compaq EVO N800C. I a couple of hours I had my laptop loaded with XP, Office 2007 Beta2, other work related software, no problems, everything running.