Update WordPress to 2.2.2

Just update my blog to 2.2.2, it was pretty easy… Just download and untar it on top of the older folder and everything was done. I did do a backup of the database by using mysqldump and gzip.mysqldump -u $user -p [dbname] | gzip > wp-backup_0827.sql.gzThe whole thing was pretty painless.


Just got a webcam

Hey people I just got a webcam and since everyone know, peripherals are a tricky thing on linux. Yes there are, but you can’t just buy the first one you find.So first what I did was looking for a software that will use it. I found a couple of them, first is Ekiga previously known as GnomeMeeting and is the classical video conferencing tool on the Gnome Desktop.Second is the  openWengo project which also support video conferencing. Is a shame that neither Gizmo or Skype has support for webcams yet.Second I look at the driver that it uses on the Ekiga Wiki page. I went to the page of the driver, this driver needed to be pretty standard and start going on the project page and get more information and installation process. This gave me the level of compatibility which was 5 star.I went on cross-searching on Mercado libre which is the e-bay like environment for buyers and sellers. Finally after some deep searching I decided on this webcam. So far I just ordered so I am still need to verify it.

Going back to listen manager-tools

For the ammount of podcast I listen to and the podcasts I can’t get to listen to, I have given up on a couple of really great podcasts. One is Killer Innovation podcast and the other one is Manager-Tools.So after a talk with a friend I will start listening again to Manager-Tools. This podcast has accumulate a lot of episodes and I think is real worth it. So Manager tools, here I come. Now I download and listening to “How to take notes” on manager tools.Now we will see how to get into note-taking since I want to actually apply some note-taking on the podcast I am listening to:So what does this podcast is about? What is the porpouse of taking notes? How can we classify the notes on?

  • notes’s mission is to take action.
  • be selective
  • use symbols
  • use abreviations
  • drawings and diagrams
  • Note typing

The average person talks about 144 a minute, but the average person writes about 25 words a minute. So being selective is key when you are having this. The problem is that too many people writes too much. Who, what and when?Take notice on:

  • WHO? job related to you
  • WHEN? deadlines
  • WHAT? job titles/description — main point

You don’t participate on the meeting when yo make notes, so make sure to write as little as possible.Use abreviations because you want to write less, and because you want to capture a keyword as oppose to a sentence. Notes doesn’t need to legible for anyone but YOU.Symbols are used extensibly and is usually about action. Having a standarize symbol pattern based on category. Make them simple and not very complex enough to advance. Symbols such as, clouds, circle, box, the goal of symbols is SAVE TIME.Drawing diagrams is a bit more spacial and more used to describe a process or a sequence. Picture work enough for you to remember enough to take action.Note typing, laptops can be highly distractive, and about typing creates more words but doesn’t simulate memory, kills symbols or drawings. Also is a bad imagine since it seems that you are not engaged.

Ode for a come back

So yesterday I went to bed around 4 or 5am. I spend the night listening to some Sunday podcasts until pretty late. Once I decided it was late enough and wouldn’t be a problem to fall asleep, I was discover how wrong I was. I couldn’t sleep at all and the thoughts of my ex-gf haunt me and some weird sense of inspiration guide me to write her and write her in verse. My eyes were closed I was already in bed but I keep having this word association of what I was trying to tell her, after a few minutes I discover that this was more than just the average nostalgia of rhyming but a true sense of driving verses. I don’t write in verse that much unless I really feel strong and inspired about things. Even to my gf, takes a lot of feeling accumulated to get into the trance of just deliver my feelings into verse.Even thought I used to write a lot of rhymes as every hip hop kids, I no longer carry my book of rhymes and the inspiration comes even more seldom but this time was it. So I create what I called “Ode for a come back” — no it wasn’t an ode in the strict literal sense although it came close to be.Baby I love youbut i can barely touch youwith my heart in my handI can’t tell u enough how much I love ubut u kill me babyon July 27my heart crumble into pieceslike the towers in 9/11with the feel of disbeliefwhat happen to my babythe person who make me freeand shook my world crazywhat later came aroundwas too hard to explainwhen you told me actually foundsomeone else that made your dayThe world I got into believewas vaporising through the airwhen I try to grab it strongerthe farther it dissipatesI felt so impotentso insecure of my worldwhat was solid as a rocknow I saw it blow in smokeIn my mind I can clearly listenwhy I never have to worryas long as I keep my feelingsand keep faith on thiswhat happened to the thoughts”I cant imagine getting touch by someone else”What happened to the hopeof seeing your green eyes againand escaping together to the U.S. of AI even remember the excitement in your voicethe day before your birthdaywe just had so much joyBut things changeand now you don’t accept meeven if u think that I am the truthu just turn around and left meNow is there’s no regards?not a single drop of hope?of feeling you in my armsbaby this is wrongcuz u know that we belongwhat happened to all the signsof Boyz II Men up at the storedo u really have the strengthto just forget and let me goIs not logical, just look at uswe are couple who best songtalk’s about forgivness and make upand we aint able to do so?look me in the eyesand tell me I aint got soulwhen our chemistry is so perfectwe just talk and we just bondI love you babyI wont forget you babyI will always be your gfand seal it with a kiss for me babyI will change up this worldjust say the wordsand just like Whitney HoustonI am gonna run…runWhat happened to usever since you left mexicoI never got back any callsevery time was just dramawhere have never beenand just 3 month before dramayou were the one paging menow u dont have time for menot even a callevery time I get thruyou yell at me that I am wronglike R Kelly songand when a woman’s fed upit ain’t just nothing you can do about itis like running out of loveAnd then it’s too late to talk about itnow I am laying alone on my bedthinking about all the things I mess up therewhy I didn’t left when I couldI would had fly straight to youI will enter in your room and make love to uis truethis is my ode for a come backdon’t mess with hearts of men that love harddon’t expect this soul to just go downjust yetThis is me holding our kidsasking you not to walk away

Small hack on Python and OpenOffice.org

So I want to make a small tutorial for a baby step world. The main point is to re-use the python samples included in OpenOffice.org. We won’t generate code, instead we will just compare notice the difference and modify slightly to change it’s behavior.

The first thing we will do is copy the samples that are on the OpenOffice.org system and move them to our OpenOffice.org profile. We will assure that the permissions are assigned to us and finally try to make the pythonTables script behave like the HelloWorld script.

The HelloWorld insert a text into the document, while the pythonTables will generate a new document and then insert text, tables, frames and other writer utilities.

Let’s get going!!!

First we will copy our script:

$ sudo cp -Rv /opt/openoffice.org2.2/share/Scripts/python/ \   ~/.openoffice.org2/user/Scripts/

Now we will change the permissions of the script:

$ cd ~/.openoffice.org2/user/Scripts/ \$ chown -Rv user.user python/

where user is your current user account name.

Now we will have some writing permissions:

$ chmod -Rv 766 python/*

Let the Hacking begin!!

So first we will run the scripts just to see that they work and nothing has gone wrong….

  • First step is starting OpenOffice.org: Launch OpenOffice.org
  • Go to Tools > Macros > Organize macros > Python…
  • You will face a dialog with a list of Python macros divided into 3 areas My Macros, OpenOffice.org Macros and Untitled.
  • Go to My Macros and expand it by clicking on the “+”
  • Select the HelloWorld and HelloWorldPython and click on Execute.

This will insert the text Hello World (in Python) on the current document.

Now lets try the other script, TableSample which will add a full text of the document. Repeat the steps that we mentioned before but instead of selecting HelloWorld, go to PythonSamples > TableSample > createTable.

This will generate a New Document with a bunch of information. So we now know that our scripts are working properly.

Open a text editor and open HelloWorld.py and TableSample.py from the ~/.openoffice.org2/user/Scripts/python folder. TableSamples might be in the pythonSamples folders so you will have to dig deeper to find it.

You will see that HelloWorld is a simple script of just 13 lines of code while TableSample.py have nearly 96 lines of code. Don’t let that intimidate you, most of the lines are just because of the amount of data that it dump to the document, but the principle is not that many lines different.

Look at the HelloWorld.py and you will see the following line:

model = XSCRIPTCONTEXT.getDocument()#get the XText interface    text = model.Text

This is the most important line and the key to what we want. We can see that there is something called the XSCRIPTCONTEXT. This is what we are looking for and major difference between both codes.

XSCRIPTCONTEXT will save us a lot of hacking in the future of coding with pyuno. However now this line will help us use the current document.

Now lets turn to the TableSample.py, we will see many functions each one with a good chunk of code. If we look closer we can see that we have 2 functions, insertTextIntoCell, and createTable. InsertTextintoCell is just a few lines long and we can see that there is nothing to our use since it focus on configuring the table. We look into the createTable and we see immediately the comment: creates a new writer document and inserts a table with some data (also known as the SWriter sample).

See that wasn’t that hard, we see that following the comment there is a line like:


We remember that the first script had something similar but on XSCRIPTCONTEXT instead of uno and getDocument() instead of getComponent(). If we keep on looking at the code we see other lines:

smgr = ctx.ServiceManager    desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)        # open a writer document    doc = desktop.loadComponentFromURL( "private:factory/swriter","_blank", 0, () )

This becomes clearer that if something in the code should change, should be this part. The doc variable is the one that actually generates the new writer document. And then we will see actions applied to the doc container like on line 32 when we generate a table by creating an instance of the TextTable.

table = doc.createInstance( "com.sun.star.text.TextTable" )

If we go back to HelloWorld.py we have the model variable as opposed to the doc variable but there is no fundamental difference and we can just replace that chunk of code. So we will just comment those lines and have something like:

def createTable():    """creates a new writer document and inserts a table with some data (also known as the SWriter sample)""" #    ctx = uno.getComponentContext()#    smgr = ctx.ServiceManager#    desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)        # open a writer document#    doc = desktop.loadComponentFromURL( "private:factory/swriter","_blank", 0, () )    model = XSCRIPTCONTEXT.getDocument()    text = model.Text    cursor = text.createTextCursor()    text.insertString( cursor, "The first line in the newly created text document.n", 0 )    text.insertString( cursor, "Now we are in the second linen" , 0 )        # create a text table    table = model.createInstance( "com.sun.star.text.TextTable" )

However since we mention before that the original code reference the document as ‘doc’ and now we just assigned to ‘model’ we can do a search and replace so that the instructions like the table one reference to model.

We go ahead and execute createTable under Tools > Macros > Organize Macros > Python… and vioala we are done.


Final shot
Happy hacking!!!

Editing video on Linux

So driven by a mixture of geekiness curiosity and the motivation of doing something special. With just one week getting on with this program I was able to do a video mashup which surprisingly came out really really good. At least more than I thought I could achieve. So the whole project took me all night to finish it up but when it was done I was able to appreciate even better.So cinelerra…. many people think is hard but is not at all.The first thing I wanted to do was watching a show from the source show which give a small tour of Cinelerra. Althought the tutorial wasn’t really what I was expecting because it was too basic. What I wanted to achieve was using the multi-tracking system and also had some video transitions specially zoom and face. I also wanted to mix the audio of one video with the other and have a slide-show generated from pictures I have. None of these things were explained on that tutorial.


The next step was going on one of my most effective ways on research which was asking people at the IRC. Freenode is known as the premier IRC server for all things open source. Even if most of the gnome stuff is on a different server at irc.gimp.org, freenode contains most projects that you will find related to KDE, Puppy, distros, etc.So I just bluntly typed /join #cinelerra and boom, I was there. After a few minutes I got people ready to answer any question I thought I should get. One of the first ones was file format specific since cinelerra didn’t seem to read my JPEG images.After a few minutes the response was that the images need to be resized to the format of the video. That means if the video was 320×240 the images should be around that size, so having a 1200×1020 image cinelerra would read it as a wav file.So I used image magic and even if the bash script that they recommend on their wiki didn’t work. I was able to just do a single convert for each image that I trully needed. I went to the imagemagick site and saw their basic tutorial on resizing.convert rose.jpg -resize 50% rose.pngCinelerra didn’t complain once I resize the images, however I will get a 1 image per frame which can be as small as a millisecond. Since I wasn’t making any subliminal movie I really wanted more than 1 miliseconds. So reading around, on the wiki I saw that I specify enable Import images with a duration of XX seconds. This can be enabled at the Settings > Preferences > Recording, the option is at the bottom of the dialog.This solution make me able to also be able to expand the exposure time on the timeline by just using the mouse and dragging the block to expand it. With my slideshow setup almost done, what will come next was adding transitional effects so they well do things like fade and zoom.So the way cinelerra’s timeline works it will show you screenshots of the sequence from the video or image or the soundwave from the audio. But it will also have lines that will go across the timeline. These lines will have different colors and will be there for different reasons. Also this lines can be turned visible or not by poping out the Overlays at Windows > Show Overlay. This will give you a small dialog giving a check list of things like:

  • Assets
  • Titles
  • Transitions
  • Fade
  • etc

We will focus on Fade, Camera X, Camera Y and Camera Z, this will give us the way to manipulate the different tracks. Having them appear or disappear will prevent us from creating nodes on a different line. So when you click on any of the lines a square (we call them nodes) will appear and you can drag them across the timeline. The dragging up and down will specify the value of that specific line, so for example if the Fade (white line) is dragged down, the element of that track will fade out.You will be able to see a representation of those changes at the Compositor window. However, the compositor will just show the frame in which the cursor (vertical line) is positioned at. So make sure you have that cursor around the period you are producing the effect.Another thing to watch out when dealing with timelines is that each timeline has some individual controls. I haven’t played with many of them, but an important button is the ‘record’ button or output (red circle). If you are manipulating the lines, the changes will affect ALL THE TIMELINES hat have the record button activated. So make sure to isolate the record on the track you are working at.


Another interesting area was using the video effects, even thought I didn’t used that many effects I was able to use the Title effect to insert text at the beginning of the video. I wont get much about effect manipulation except that when you insert an effect into a timeline you will have a bar with a key on one extreme and a lens and icon on the other end. When you click on the lens a configuration dialog for the effect will come up.So in the end, the video came up alright, I did a Rendering with Shift-R and took around 6 minutes to encode. Then I re-encode it on a smaller file format and upload it to Youtube.I will still need to play more with this, but the end result was an awesome video. Try it yourself.Interesting Links

High School Reunion

So today, pachela became my friend in facebook. Her album is just awesome. It was good finding my high school friends reunite again. There are pictures from what looks like a really fun party, full of smiles and frienship. I’m not sure it was smart not going to that party since it seems that there has been a lot going on. From the parties to the stories and yes, work is important but is not timeless like old good friends are. I hope I can come back and live this experience.I wonder if this facebook will really pick up in mexico and I soon find more friends in it. Maybe I should email some of the group’s innvite list and email them personally.

Old friends are comming back again

Wow incredible, after rejecting facebook for a while, I finally have been coming into it. The best part is that it worked, I was able to get back in touch even from elementary school friend.  This has been a pleasant surprise and I hope I can get them back in touch with them and talk to them through the web.Hope you guys have fun on the next event. After a week I already have 51 friends.

Pidgin the single most used app


So when it comes to which application I have on all the time, is not the browser or the mp3 player but the Instant Messenger using Pidgin/Gaim.Since most of my computing time goes to the messenger the question is, why there is no more integration. Most of the files are transfered by email which is less than desirable. However there is nothing wrong with the other part which is the file transfer in IM. However there is a problem since this file transfer is more often than not broken under Gaim.This is a big issue since yes, you want just to talk to people but most time you transfer files in that exchange. So having Pidgin re-enforce the file transfer on all the protocols is a strong plus for the Linux Desktop.Another thing that pidgin could develop is an integration with other applications. Pidgin currently has many plug ins are already in pidgin, I can search it to a trac page for the PluginPack. One of the best plug ins I have seen or at least the one I like the most is GPG keys for secure chat connections. The famous guification plug in to tell you when you get a message, and the plug ins I am talking about which are the integration plugins like integration to XMMS and XChat, however I would love to see a more standardize way to make plug ins against applications. So far we have pygtk plugins at the gnome level using gnome-applets, xchat2-gnome, epiphany, and other applications have this. However other big applications like Evolution doesn’t have this framework to work upon.Question here comes with other things like, would this make my application slower and more memory hungry? I hope not.