Look, if you’re on a Mac, and you do any sort of text editing (html, programming, whatever) and you’re not using Textmate, you SHOULD be. It’s worth the price, I promise. (And there’s a 30 day free trial anyway.) Just a friendly reminder. =-)
Archive for the ‘Technology’ Category
Best. Editor. Ever.
Saturday, April 29th, 2006ETech 2006 Notes
Tuesday, March 7th, 2006I’m posting all of the notes that I take, as well as any I can find shared by others via SubEthaEdit over at http://avantbard.com/docs/etech2006/.
So far, pretty fun.
Catching Up
Monday, February 13th, 2006It’s been awhile, no?
Since my last post, I’ve been on two bird watching walks led by the very friendly and knowledgeable Robert DeCandido and Deborah Allen. I’m already better at identifying some birds, and I’m certainly noticing a lot more birds when I’m out in the parks now than I ever did before. I can’t wait for the Spring migration to start; my brain will get overloaded trying to identify multitudes of warblers, vireos, etc. Oh yes, and the warmer weather will be most welcome. Sure, we’ve had a warm winter so far but still, cold sucks.
Also, I started playing World of Warcraft again, which certainly explains some of my lack of posting in the last month. Yes, it’s been very fun playing again, probably because I took a couple months off. However, it’s starting to loose it’s fun value yet again. I think mostly because it boils down to that same formula of running around and killing things. Don’t get me wrong, killing virtual baddies is fun, but as your character grows stronger, so do the baddies, so sure, it’s fun to be able to stand up to monsters that I ran from when my character was younger, but the game play experience doesn’t change much. The only thing I really really like is exploring the new areas that you get to go to as your character gains strength. Blizzard has done an amazing job with the art direction in WoW, and it’s very cool to explore as much as you can. Unfortunately, I’m not sure I want to keep hacking and slashing just to get the chance to explore more areas.
And then, maybe because I’m on a synthetic worlds kick right now, I tried out Second Life the other day. Sure, it’s definitely not as polished as WoW, not by a long shot, but it’s lack of a unified art direction vision is also part of its greatest strength: all of the content in Second Life, from the architecture of buildings to the design and clothing of the avatars, is user-created. If you’ve read Neal Stephenson’s Snow Crash then this will sound a little familar to you; SL is definitely the Metaverse version 0.1a. I’ve been spending my time in SL trying to see if I can get flocking behavior to emerge in objects based on a few simple rules. SL has a not-terrible scripting language available, and it’s been a fun exercise. I promise to post a video capture of my flocking objects if I’m successful in my endeavor. Related: Evolving Nemo. Basically, I’d like to do something similar in SL, but for birds. We’ll see…
I <3 Ruby
Monday, December 12th, 2005Today’s reason why I love Ruby: I had a text file and I wanted to take each line and use its content as a string to construct list items as HTML output. Here’s what I wrote:
File.open(“/Users/gabe/file.txt”).each { |line| puts “\t<li>” + line.slice(0..-2) + “</li>” #using slice to knock off the \n from the end of the line }
Ruby should take a hint from Staples and adopt a new motto: “That was easy.”
AimBots
Wednesday, November 16th, 2005I just signed on to AIM today and saw:
[09:51] AOL System Msg: AIM added a new AIM Bots group to your Buddy List. [09:51] AOL System Msg: Send IMs to moviefone and shoppingbuddy for great holiday flicks and gift ideas. (To remove ‘em, just right-click and delete! Learn More)
Is this part of AOL’s attempt to improve their image, by giving me new buddies (albeit virtual ones)? I’m so thrilled.
Change Firefox’s Prev/Next Tab Key Combos
Sunday, April 17th, 2005I’ve always wanted to remap Firefox’s key combos for the next/previous tab commands (mostly because I like Safari’s key combos better). Finally, I figured out how:
- Install the Keyconfig extension.
- Go to Tools -> Keyconfig
- Click ‘Add a new key’
- In the top box, give your new key combo a friendly label, like ‘Prev Tab’ — In the bottom box, enter this: gBrowser.mTabContainer.advanceSelectedTab(-1);
- Click OK
- Click in in the bottom textbox and enter the key combo you’d like to use for ‘Prev Tab’
- Click Apply
- Repeat steps 3 through 7 for ‘Next Tab’ and use this for the bottom box in your definition for ‘Next Tab’: gBrowser.mTabContainer.advanceSelectedTab(1);
That’s it. It appears to work just fine, except that the key combos don’t seem to work on new (blank) tabs, but once you load a page in the tab, it works great.
Google SMS
Monday, January 3rd, 2005So, it’s my first day back from vacation in LA, and I’ve already got a nerd tip to start your year off with a bang: Google SMS.
Google SMS (Short Message Service) enables you to easily get precise answers to specialized queries from your mobile phone or device. Send your query as a text message and get phone book listings, dictionary definitions, product prices and more. Just text. No links. No web pages. Simply the answers you’re looking to find.
There’s lots of query types, from business info to calculations to zip code lookups. So the next time you’re on the go and need the number for that resturant that you’d like to make dinner reservations at, or you’re wondering if $20 is a good price for Harry Potter and the Goblet of Fire, or you don’t know what the word ‘peloria’ means, try Google SMS. Of course, read the instructions and examples so that you know what you’re doing. =-)
PHP: Check If A String Contains An Int Value
Thursday, September 9th, 2004Quick PHP tip: If you have a string value that you need to test to see if it’s an integer (like $str = “69″), you’ve got to turn the string into an int by referencing it in a mathematical context somehow. The easiest way I can think to do this is to add zero to it. Then, you can use is_int() to check to see if it’s an integer. Here’s my sample code:
$string = "69";
echo strIsInt($string);
function strIsInt($str) {
if(is_int($str + 0)) {
return("TRUE");
}
else {
return(0);
}
}
// The above code will output "TRUE"
Pretty useful for validating variables in your query string that you expect to be integers (like for database queries, ya know).
See also: - PHP: Type Juggling - PHP: String conversion to numbers
Javascript Text Input Autocompletion
Thursday, August 26th, 2004Parts of the blogosphere have been buzzing about javascript text input autocompletion lately. Here’s a collection of links for my (and everyone’s) reference:
- Brian at Sweeting.net is offering $50 to iTMS or Amazon for the first person who can reproduce Gmail’s javascript autocompletion
- Sitepoint article on JS autocompletion
- Simon Wilson’s post about Sitepoint article, with comments
- Codeproject.com has a different autocomplete script
- Another Codeproject.com js autocomplete method and here’s a working demo of this code
- Inner Geek thoughts on js autocompletion
- Another dropdown-like autocomplete example (hosted here)
How to Build Ethereal 0.10.4 on Windows XP
Friday, June 25th, 2004So I needed to build Ethereal from source on Windows XP. It wasn’t as easy as building from source on *nix or MacOS X, so I’ve compiled some info about how I did it, in case anyone else will find it useful.
Read more to see the steps that worked for me (and others). (more…)