Archive for the ‘Techitude’ Category

Twittipy 0.2

Friday, September 19th, 2008

I’m on a very brief break and hacked on my Twitter notifier for a couple of minutes. To tell you the truth, a couple of bugs have been ironed out a week after I posted the first version. It has been working so well, I didn’t bother playing around with the code.

Twittipy now prompts for your username and password. If you want it to save to the config file, just uncomment some of the lines. I’m not comfortable with the password saved in a file and I haven’t thought of a way to encrypt them. By the way, Pidgin saves passwords in plain text too. The login prompt is old code from a wxPython experiment some time ago (and it ain’t pretty).

After you get authenticated, an icon will appear in your system tray. To exit Twittipy, right-click on the icon.

Download it here.

Install Wine 1.1.4 on Fedora 9 + Google Chrome Comments

Sunday, September 14th, 2008

I love Wine! No offense to the GIMP folks but I still use Photoshop 7 and when I found out that it now works out of the box with Wine, it gained my trust. Here’s how to install Wine 1.1.4 on Fedora 9.

  1. Check if you have wine installed.
    $ rpm -qa | grep wine
  2. Uninstall the old version.
    $ sudo yum -y remove wine
  3. Download the latest build from Koji. The following is the i386 build.
    $ wget http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-twain-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-capi-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/src/wine-1.1.4-1.fc9.src.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-jack-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-nas-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-core-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-ldap-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-cms-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-cms-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-tools-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-desktop-1.1.4-1.fc9.i386.rpm \
    http://koji.fedoraproject.org/packages/wine/1.1.4/1.fc9/i386/wine-esd-1.1.4-1.fc9.i386.rpm
  4. Install the RPMs.
    $ sudo rpm -Uvh wine-*
  5. Confirm installation.
    $ rpm -qa | grep wine

I upgraded to the lastest version of Wine just to get Google Chrome running on Linux even if I already read that it’s slow and SSL support is absent. I followed this guide.

I almost got it running but it was really slow (see screenshot below). I also have V8 compiled but when I tried to play around with it, I didn’t know what to do even with the interactive console.

Screenshot

My invaluable thoughts on Chrome:

  • I think it’s great that it uses Webkit. Not really sure if it’s faster than Gecko but at least testing with Webkit is more fun now.
  • You can drag a tab in and out of the window. That’s cool but I couldn’t pin the window to stay on top.
  • The developer tools are almost as great as those provided by Firefox extensions (i.e. Firebug).

Breaking The Silence

Sunday, September 14th, 2008

Some people are starting to stalk (not follow) me on Twitter so I’m thinking of making my updates private. I’m not a selfish person so I’ll blog some of my tweets here.

SIPv4 - A commentary on the state of SIP

Philippine Web Design Conference (a WIP)

Sangoma U100 - A USB FXO for Asterisk. I’m getting one, thanks to Mark Q. [pic]

Koji - package builder for Fedora

Cairo-Dock - giving in to using this dock so my windows minimize to it only because I can’t configure my XFCE task list to expand. I want to configure it so that the icons highlight when hovering over the icons. Right now it zooms in.

His Art, Our Heart: The Amorsolo Retrospective - just a plug on what I worked on recently. I’ve fallen in love with mootools and this is coming from someone who always loathed frameworks.
Credits:
Art Director: David Guerrero, Dino Cabrera, Guadakomeda, Leah Mababangloob
Logo Design: Bixie Reyes, Gino Caoile
Copywriter: Racquel Narciso, Pia Roxas, Maan Agsalud
Accounts: Cels Esguerra, Mads De Guzman, Karen Go
Developers: Dennis Billano, JP Loh

dancedroop

Monday, July 21st, 2008

I got tipped that rumors are spreading that I know who Mary Jane (the person behind the dancedroop Multiply account) is. Wow. I am flattered. People think that we, Pat and I, traced the real person behind all the scandalous blog entries.

Unfortunately, I am not like the computer hackers that you would see in the movies. During weekdays [and nights], I am nothing but a corporate slave where I am forced to randomly type gibberish on the keyboard.

Weekends are also spent in front of the computer but chatting with friends that I met on the Internet and waiting for content to be cached by Google. I have no real social life and no girlfriend.

I do not crack into servers during my free time. I can’t. I can’t because I do not know how. I am not even close to becoming a script kiddie. What more with tracing the person behind the content cached by Google?

I can’t see the world where Japanese characters stream down like Neo does in The Matrix but if the lights in your room start flickering while you read this, I may have found a way how to do it.

Pidgin: Invisible Buddies + Some Thinking

Friday, July 11th, 2008

Pidgin: Invisible Buddies

This is me amused with little things.

On a side-note, I think it’s about time to get a new laptop. It’s not that my current laptop needs more juice. It works just fine for my needs and brought me great fortune in the past 4 years from college requirements to enterprise software.

Fedora 7 just reached its end of life and I get this OCD that I have outdated software. With the urge to upgrade but no place to backup my files (strange, all of my drives are full), I think a new laptop is the answer.

An extra hard disk would be a lot cheaper but I’m weighing the extra convenience that I’ll get with a more modern laptop. For instance, if I had a newer wireless card with 802.11g (yes, my laptop is 802.11b!), I’ll be using drivers with WPA support and higher transfer rates. With a DVD combo drive (vs a CD-ROM drive), better RAM, graphics card, and processor, makes me convinced that it’s, err, about time.

I’ll be getting an HP/Compaq because all of our laptops at home that carry the same brand are still alive. Also, it won’t be anything fancy. Just a boring normal laptop and it won’t be a tablet like I wished before. The TX2000 and TX2500 are available locally though.

There will be one busy weekend soon.

Twittipy: A pynotify and pycurl experiment

Friday, June 27th, 2008

It’s been a drag since Twitter IM went down. I had a very brief “play” time the other night that gave birth to Twittipy. It’s a Twitter notifier written in python with pynotify and pycurl.

Running Twittipy

  1. Create a configuration file in your home directory (~/.twittipy)
  2. Set your Twitter username/email and password in the configuration file.
    Example:
    [general]
    username = johnsmith
    password = unhackable
  3. Make Twittipy executable
    $ chmod u+x twittipy.py
  4. Fire it up!
    $ ./twittipy.py &

Twittipy requires Python 2.5, pycurl and pynotify. If it complains of missing modules, you probably didn’t meet the requirements.

Roadmap

I did some googling and found other stuff to try that could improve Twittipy.

  • Port for other platforms (Windows with pywin32 and KDE via wxPython)
  • Icon at the notification area or system tray (via wxPython)
  • Encrypt or obfuscate password in config file and/or if password is not found in the config file, prompt and store in memory.
  • Make use of the other methods of the Twitter API.

Download it here. There are two more options in the config file, update_interval and last_update. The former defaults to 4 minutes and the latter to the current time.

I’m quite satisfied with it. The notifications of pynotify are less obtrusive than an IM message. There’s one noticeable quirk where a tweet repeats. We’ll fix that for the next release.

Comments are welcome and please check out tweetyPy as well (not mine but also an academic project).

Finch

Wednesday, June 11th, 2008

Pidgin kept crashing when I tried tunneling through a remote machine. After minutes of googling around, I found Finch, a command-line version of Pidgin! It used to be called Gaim-text. Really cool!

Finch

I need a new hard drive for…

Sunday, May 25th, 2008

On a side note, any comments on the “modern” Winamp version? I’m thinking of using its library features. Since my media “server” back at home was decommissioned, I’ve been having problems with my muzak itches.

Another side note, is there a portable music player out there that has a ≥60GB flash drive? I might’ve dropped my iPod too many times. A fancy UI is the least of my concerns.

I think about queues all the time.

Thursday, April 24th, 2008

Here’s something to waste your time and bore your brains out.

There are three nodes, say Nodes A, B and C. Node A and C are application servers. Node B is a messenger for nodes A and C. Although Node B is not needed but for reasons I’m not allowed to discuss and would rather not discuss, it has to be there and is the root cause why we have a problem.

Let’s start with an example series of events. A new transaction begins from Node C which sends data to Node B. Node B stores the data in a queue. Node A fetches x items from the queue every y seconds.

After Node A processes the transaction, it begins a new transaction. Node A sends data to Node B only this time, it is no longer stored in a queue. Node B immediately forwards the data to Node C.

On some occasions, Node C starts a new transaction as an acknowledgment from the data that originated from Node A. This transaction is treated as a transaction similar to the first one only that Node A knows that it’s an acknowledgment.

Originally, Node A and Node C communicated to each other directly. The queue didn’t exist. The queue came in to fix a couple of problems but it introduced new ones. Recently, the script in Node A that polls data from Node B died and now it’s catching up with backlog. The script processed data one by one. This showed how slow the main application in Node A is.

I already have a solution in mind and I enjoy writing boring stuff but I’d like to hear other views.

Reduce Attacks on Apache+PHP

Sunday, April 20th, 2008

A couple of days ago I thought that one of my servers got compromised. I thought someone cracked my password by brute force and kept shutting down Apache at 4AM. As it turned out, I made a mistake with the log rotation configuration that the post-rotation restart fails to start Apache.

I immediately installed DenyHosts, disabled keyboard-interactive login and hardened the firewall. It made me feel more insecure which resulted into today’s post.

With a fresh install of FreeBSD 7 on another server yesterday, I wanted to make sure that I do it properly from the start this time.

Apache adds the Server header that reveals the OS, version and some modules. PHP also adds an X-Powered-By header that shows the version of PHP. With those information publicly available, someone can write a script that could exploit vulnerabilities on specific versions of Apache and/or PHP.

For Apache, you can use mod_security. It’s available as a port and at Karanbir Singh’s yum repository for CentOS users. See the directive below.

<IfModule security_module>
  SecServerSignature "Apache"
</IfModule>

Also, just to be a happy camper, I used a new configuration file to be included. Consult your configuration for the path. On CentOS, the default configuration directory is at /etc/httpd/conf.d. On FreeBSD, it’s at /usr/local/etc/apache[n]/Includes, where n may be your Apache version.

For PHP, simply set expose_php to off in your php.ini

Disclaimer: This works for me but I’m not sure if this is the best way to do it. I tried mod_headers first but it didn’t work.