'LINUX/OSX: FIND OUT WHAT NETWORK PORTS ARE IN USE'

To get a quick idea of what ports you have open on your local box, you can use nmap. ~ jhaddad$ nmap localhost Starting Nmap 5.00 ( http://nmap.org ) at 2010-01-05 11:06 PST Interesting ports on localhost (127.0.0.1): Not shown: 499 closed ports, 492 filtered ports PORT STATE SERVICE 80/tcp open http 88/tcp open kerberos-sec 548/tcp open afp 631/tcp open ipp 3306/tcp open mysql 3325/tcp open...

MACBOOK AIR BATTERY DRAIN WHILE SLEEPING

I bought a MacBook Air in June this year, refurbished. I didn’t really use it a lot for day to day work, and when I didn’t use it I was charging it. It was very convenient - it weighs practically nothing and has almost no impact on me while traveling. When I cut back on using it, I noticed a few things. When I’d leave it unplugged for a few days, the battery would be dead. After...

STORED PROCEDURE FOR FINDING COLUMNS IN MYSQL

Looking for instances particular column in a large schema can be a pain. Fortunately the information schema makes this pretty easy, if your columns have a consistent naming convention. SELECT table_schema, table_name, column_name FROM information_schema.columns WHERE column_name LIKE '%some_name%'; Now, if we want to wrap this up into an easy to use stored procedure, we can do something like...

IP ADDRESS GEOLOCATION SQL DATABASE

I’m sick of looking through chat logs to find an IP geo lookup database. Now it’s here, possibly forever, or until I stop paying for hosting.

SETTING UP A REMOTE GIT REPOSITORY

Here’s a great guide for setting up a new remote git repo. Thank you, Tool Man Tim.

PYDEV TUTORIAL

I found a good tutorial on IBM on doing Python development with Eclipse. It might be a little out of date, but I think only the screens got moved around a little bit. It includes details on how to use ant, which I’ve recently started using with cruise control and PHP, so I’m becoming a fan. I did run into an issue where I’d get the error ‘Variable references empty...

'AWESOME PROJECT: SPARKUP'

Sparkup is a TextMate and Vim plugin for expanding short CSS style tags into HTML, written by my man Rico Sta Cruz. From the github page: You can write HTML in a CSS-like syntax, and have Sparkup handle the expansion to full HTML code. It is meant to help you write long HTML blocks in your text editor by letting you type less characters than needed. Sparkup is written in Python, and requires...

USING KICKSTART TO AUTOMATE CENTOS VM CREATION

I’ve done this using CentOS, but I’m pretty sure the same thing will work with RedHat the exact same way. Virtualization is now a commodity with several free tools available from Sun, VMWare and Xen. If you’re like me, you like to create a new, clean VM for each experiment. However, this comes with a drawback - the installation process, choosing your timezone, putting in the same...

VIRTUALBOX - SSH'ING INTO A VM FROM AN OUTSIDE MACHINE

Note: The terminology used below also applies to VMWare. The screens are different, but the issue and the solution are the same. When creating a new VM through VirtualBox, you might have a problem SSH’ing into the box. You also might notice you get a 10.0.x.xx type address, even though the rest of your network is a 192.168.xx.xxx deal. Yes, the two are related. Essentially what’s...

PYTABLES USER'S GUIDE

I finally found the manual for PyTables. In case anyone else is as blind as I am, I’m linking to it here.