The Gahooa Perspective's Image

The Gahooa Perspective

http://blog.gahooa.com
More about this blog
Latest Post
23 Jul 2010
Total Posts
34
Readers
589
Liked
0
Disliked
0
Views-Per-Post
17.32
vote up
0
vote down

Night Assault (impromptu video)

This short video was filmed impromptu at a picnic… all using a Motorola Droid X. The quality in the evening is not the best, but it makes for an interesting short. Tagged: Android, Army, Droid, Droid X, Fun, Motorola, Video
 
Jason Garber
Jul 23 2010 10:53 PM
vote up
0
vote down

U.S. Student Loan Amounts

There is an estimated $730 billion in outstanding federal and private student-loan debt, says Mark Kantrowitz of FinAid, a Web site that tracks financial-aid issues — and only 40% of that debt is actively being repaid. The rest is in default, or in
 
Jason Garber
Jul 23 2010 06:01 PM
vote up
0
vote down

How to checkout and track a remote git branch

One of those really handy things to remember… When git “tracks” a branch, it basically sets up an entry in .git/config which tells git what to do with push and pull. For example: I had a remote branch called Task/Round3.3. I wanted to
 
Jason Garber
Jul 10 2010 10:00 AM
vote up
0
vote down

MySQL, PostgreSQL, Oracle, SQL Server — Order by RAND ?

Great howto on grabbing a selection of random records from a few different databases here: http://www.petefreitag.com/item/466.cfm Tagged: Database, Random Records
 
Jason Garber
Jul 09 2010 08:11 AM
vote up
0
vote down

Youngster shooting a Ruger Mini-14

At a reclaimed strip mine shooting a Ruger Mini-14 Stainless, under proper adult supervision of course. Tagged: Mini-14, Ruger, Shooting
 
Jason Garber
Jul 06 2010 12:53 AM
vote up
0
vote down

Ubuntu Post-Install tips…

I received this from a friend, and thought I would post it here in case anyone would find it useful. After Installing Ubuntu, basically I do this: Go to: System -> Administration -> Software Sources -> Other Sofware, and enable partner
 
Jason Garber
Jun 15 2010 02:05 AM
vote up
0
vote down

git add -u

Here is a nice little tidbit I ran across some time ago… Ever delete a bunch of files from a git working copy, and then had to go in and tell git that you meant to delete them? For example: [jason@dc40 AppStruct]$ git status # On branch master #
 
Jason Garber
May 17 2010 06:11 AM
vote up
0
vote down

PostgreSQL Dump and Restore Notes

The pg_dump and pg_restore commands provide excellent flexibility in storing a compressed dump file, and selectively restoring any part of it. I’ve found that dropping and re-creating the target database is the cleanest way to restore a dumpfile
 
Jason Garber
May 17 2010 05:40 AM
vote up
0
vote down

Interesting Numeric Pattern

>>> for i in range(1,31): ... print(' ' + '1'*30) ... print('x ' + '1'*i) ... print('= ' + str(int('1'*30) * int('1'*i))) ... print() ... 111111111111111111111111111111 x 1 = 111111111111111111111111111111 111111111111111111111111111111 x 11
 
Jason Garber
May 16 2010 01:33 AM
vote up
0
vote down

New Wooden Gun Project

In our workshop, we have been designing a new toy wooden gun model in SolidWorks. This is inspired by the classic Thompson Machine Gun from the early 1900′s in the US. We will probably make it out of maple or walnut, and either paint or stain it.
 
Jason Garber
Apr 25 2010 04:54 AM
vote up
0
vote down

Original Computer Joke

What does someone do who is Cold and Hungry?? >> Close their Windows and buy an Apple! This came to mind sometime after I bought a Mac when my son (who is seven) asked me if I didn’t like Windows… Tagged: Apple, Joke, Mac, Windows
 
Jason Garber
Apr 12 2010 09:55 PM
vote up
0
vote down

TypeError: list indices must be integers

You start your day, happily working with dictionaries…Life is good. >>> mydict = {'key-a': 'value-a', 'key-b': 'value-b'} >>> mydict['key-a'] 'value-a' All of a sudden, storm clouds appear. Your dictionary variable
 
Jason Garber
Mar 09 2010 06:10 AM
vote up
0
vote down

nginx restart error

Was playing around with nginx on Centos 5 (EPEL package). Most of the time I ran: service nginx restart I would get this message in the /var/log/nginx/error.log file: panic: MUTEX_LOCK (22) [op.c:352]. After some hunting around, it appears to be a known
 
Jason Garber
Feb 25 2010 08:12 AM
vote up
0
vote down

Great article on Python super, __mro__, and attributes

I highly recommend reading this excellent writeup on Python super(), python __mro__, python attributes, and more. It is Copyright © 2005-2009 Shalabh
 
Jason Garber
Feb 21 2010 03:13 PM
vote up
0
vote down

git scm tip

You may be aware of git add . But did you know this: git add . adds all the files. Use with care (only after git status, for example). git add -u . adds and deletes all KNOWN files. This is great if you added and removed or renamed files. Tagged: git,
 
Jason Garber
Feb 21 2010 02:26 AM
vote up
0
vote down

Is it just me, or does this get old?

Hi Darryll, If I have to say no again, you will officially be a nuisance. Have a great day, and best wishes with your endeavors. – Best Regards, Jason Garber Senior Systems Engineer AppCove, Inc. On Tue, Jan 12, 2010 at 10:35 AM, Darryll
 
Jason Garber
Jan 12 2010 09:14 PM
vote up
0
vote down

Google’s Lack of Customer Support

Perhaps it’s because Google hasn’t had “traditional customers” en mass for so long? Perhaps it’s because Google is 99% full of techno-geeks that are very focused on technology? Perhaps it’s just a lack of
 
Jason Garber
Jan 09 2010 12:06 PM
vote up
0
vote down

Python 3 bytes indexing returns integers!

While converting a bunch of werkzeug code to Python 3.1, I ran into an issue with one of the bytes objects that was previously a string. The line of code in question was originally this: if value and value[0] == value[-1] == b'"': ... If value is
 
Jason Garber
Dec 31 2009 09:54 PM
vote up
0
vote down

Example Automated MySQL Backup Script

Rather than use --all-databases, which will prevent you from being able to selectively restore any single database, consider the following: Ideally, you should have a daily backup, with some history. It should be bulletproof (--force), it should be
 
Jason Garber
Dec 26 2009 11:10 PM
vote up
0
vote down

How to Author a *simple* jQuery plugin

I use jQuery as the JavaScript library for most projects. It’s terribly convenient for selecting elements and processing them. However, jQuery is not JavaScript, and there is a lot of things it cannot do. Rather than writing a separate set of
 
Jason Garber
Dec 22 2009 12:19 AM
vote up
0
vote down

jQuery mouseout vs. mouseleave

Hello! jQuery has a mouseout and a mouseleave event. The main difference is in how they handle child elements. Mouseout fires when the pointer moves into or out from child element, while mouseleave doesn’t. This was causing a slight problem of
 
Jason Garber
Dec 19 2009 12:21 AM
vote up
0
vote down

Python has keyword only parameters!

Maybe I should have known this about Python by now, but… Little did I know (was wishing for it today), but there IS a way to specify that arguments MUST be keyword only. def foo(a, b, *, c, d): print(a,b,c,d) In this case, everything after the * is
 
Jason Garber
Dec 09 2009 03:36 AM
vote up
0
vote down

A response to Preventing a pirate attack

An open letter to Daniel Jones, of GDS Publishing Ltd. “The definitive resource for the global oil and gas energy industries online…” Hello Mr. Jones,   I just read your well done article on ways to prevent a pirate attack. I liked
 
Jason Garber
Dec 01 2009 08:07 AM
vote up
0
vote down

A brief introduction to AppStruct

Have been very busy at work lately. We made the decision about a month ago to switch (most|all) new projects over to use Python 3 with Apache, mod_wsgi, and AppStruct. You may know what the first 3 are, but the 4th?? Special thanks goes to Graham
 
Jason Garber
Nov 21 2009 10:16 AM
vote up
0
vote down
vote up
0
vote down

Python 3.1 and mod_wsgi performance notes

We’re researching the use of Python and mod_wsgi running under apache for developing some extensive web applications. Here are some notes on a performance test that we recently
 
Jason Garber
Oct 11 2009 03:10 PM
vote up
0
vote down

What is a tuple?

I get asked this from time to time, so for the fun of it, I’ll post this: Tuples are immutable lists in python (and other languages). Very lightweight, unchangable arrays. They are used for storing multiple values in one variable (usually a fixed
 
Jason Garber
Sep 04 2009 03:35 AM
vote up
0
vote down

Freeky Bug

Ever have one of those bugs that customers complain about, but you just cannot reproduce it? Here is a good one… Customers were complaining about being logged out when clicking a download link. This particular setup is a Cisco CSS 11501 series load
 
Jason Garber
Aug 23 2009 09:08 AM
vote up
0
vote down

Interesting Thoughts on Cloud Server Performance

Apache load testing on a Cloud Server – Jason – 7/31/2009 I recently created a cloud server for a wordpress blog, and configured it to the point that the blog was working OK. Then I decided to check the performance aspects of the server, as
 
Jason Garber
Aug 02 2009 03:17 AM
vote up
0
vote down

Starting to use SolidWorks

We recently purchased a copy of SolidWorks to use with our various engineering projects. In about 3 hours, I was able to learn how to create parts, assemblies, and drawings. The software (to this point) is nothing short of incredible. And I’m just
 
Jason Garber
May 30 2009 08:20 AM
vote up
0
vote down

To become a masterful internet application engineer?

How many languages or technologies does one need to master to be a masterful internet application engineer? Please comment!
 
Jason Garber
May 12 2009 09:49 PM
vote up
0
vote down

Great post on PHP's preg_match regular expressions

Over at smashing magazine, they have a great post on PHP’s preg_match() regular expressions. They cover a number of advanced topics in light detail, including: 1. Greediness/Laziness 2. Back Referencing 3. Named Groups 4. Word Boundaries 5. Atomic
 
Jason Garber
May 08 2009 02:24 AM
vote up
0
vote down

Time Lapse Photography

I think this is a really cool picture. It is one from a set at http://www.smashingmagazine.com/2008/08/24/45-beautiful-motion-blur-photos/ Tagged: Photography, Time Lapse, Time Lapse Photography
 
Jason Garber
Apr 30 2009 07:59 AM
vote up
0
vote down

Perspective on keeping your computer secure.

I’d like to start this off by saying if you want better security… …switch to a good BSD or Linux distribution! What follows is an email that I typed up to someone who was being aggressively sold anti virus software by a PC security
 
Jason Garber
Apr 07 2009 09:40 PM