'DEAR PRICELINE: SERIOUSLY, WTF?'
Dear Priceline, You really can’t do better than $680 for a flight from LAX to Vegas? Seriously, why is this the #1 listing? For those of you who aren’t aware, it’s a 1 hour flight that normally costs $60 each way. Southwest (cropped out middle prices for simplicity) Lame.
THE LACK OF FLEXIBILITY OF STORED PROCEDURES IN MYSQL
Over three years ago I wrote about how you cannot use a stored procedure in a subquery. Well, it’s 2010, and I’m still annoyed by this and a handful of other things. I was just working today on a report consisting of a series of queries, taking about a minute to generate. Some of the data would be created in a temporary table and queried against multiple times for performance reasons,...
'REDHAT/CENTOS: CONTROL APACHE STARTUP WITH CHKCONFIG'
Copy apachectl (or symlink it) to /etc/init.d/httpd, and add these two lines at the end of the comment section: chkconfig: 2345 64 36 description: script for starting and stopping httpd chkconfig –add httpd These commands will now work: service httpd start service httpd stop Additionally, apache will start when the system boots. You can accomplish this by using rc.local too, if you prefer,...
'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...