Sunday, August 30, 2009

`require': no such file to load -- zlib (LoadError)

/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:10:in `require': no such file to load -- zlib (LoadError)

So you get the above error when attempting to install a ruby gem in ruby 1.9+?

First: make sure you have libzlib installed:

sudo apt-get install libzlib-ruby

Then go back to where you unpacked ruby 1.9 and rebuild:

./configure
make
sudo make install

done!

Monday, August 24, 2009

Postling.

I'm checking out this Postling service (and posting through it). I wonder how this service will work out in the long run. Do people really want to manage all their content in one place? We'll find out.

Labels: ,

Wednesday, July 15, 2009

The only cure... is more Google.

I use the following:
  1. Google Search
  2. Gmail
  3. Google Docs
  4. Google Calendar
  5. Picasa
  6. Google Domain Registration
  7. Gchat
  8. Google Eclipse Plugin
  9. Google Web Toolkit
  10. Google Tasks
  11. Google Reader
  12. Google Checkout
  13. Google Maps
  14. Youtube
  15. Blogger
  16. Google Groups
  17. Google Apps for your domain
  18. Google Shopping
  19. Google Voice
Google services I specifically don't use in favor of competing products:
  1. Orkut (Facebook)
  2. Google Code (Github)
  3. Knol (Wikipedia)
  4. Chrome (Firefox)
On one hand, one might (tinfoil hat style) argue that I'm giving them wayy too much information about myself... but honestly: if someone has a better product than the ones I listed without a high switching cost, I'm all for it.

Perhaps... I will apply for a job @ Google. That's easy, right?

Sunday, June 7, 2009

Note for future: Cufon > sIFR

When working on the Doritos project, I used a text to flash replacement for using custom fonts called sIFR (scalable Inman Flash Replacement). This worked well, but was a CHORE to set up and get working, and depends on Flash.

Recently in the irc.freenode.net##javascript channel someone mentioned Cufon.

http://wiki.github.com/sorccu/cufon/about

I'll have to make a note to use this in future. It uses VML for IE and Canvas for all the real browsers.

Excellent find.

Labels: , , ,

Thursday, May 21, 2009

Caps Lock to Control

For future reference:

capslocktocontrol.reg

Die, evil caps lock key of typos.

Labels: ,

Monday, May 18, 2009

Emacs keybindings in Eclipse (or: Little Emacs Tricks #3)

Window>Preferences>General>Keys>Scheme[Emacs]>Ok

/sighofrelief

I didn't realize this was an option. Oh happy day.

I may now switch back and forth without spinning my keybinding section of my brain in a knot.

[UPDATE]
One annoyance: the keybindings support throwing things you kill onto the clipboard, like emacs does, but there is no clipboard stack implemented. Now: I have to remember not to kill if I want to maintain what I have copied. At least delete word doesn't mess with the clipboard. That'd be hella annoying.

Labels: ,

Thursday, April 30, 2009

Little Emacs Tricks #2

Emacs sometimes surprises me with wonderful little features.

Today, I realized the power of "undo in region".

If you remember you had made a change on a section of a file, but don't want to undo all the changes you've just been working on, mark a region and C-_ till you get what you're looking for. Until you unmark the region, it will only undo actions that affect that particular region.

This is particularly useful when working in large class files with many methods, or huge javascript files with too many functions. You can highlight a function, undo the changes you made half an hour ago, and continue on, without having to go redo the changes in between.

For instance, I was working on a heavily documented file, and realized I had accidentally deleted the Javadoc in one section of the file. I had done this a long time ago. I selected the lines where the Javadoc used to be, C-_, and boom, there it was, without affecting anything else in the document.

Wonderful stuff.

Labels: ,

Wednesday, April 29, 2009

Black screen when installing Windows XP after Linux

So recently I realized that my old laptop has a FAR stronger video card than my new one(GeForce 6800m vs. Intel X4500HD), so I decided to install windows in the empty space on the harddrive to get some casual gaming in.

Well, pop in the Windows XP disk, and boot from it: Setup is now inspecting the hardware configuration... and then a blank, black screen.

The problem is not with Linux.

I come to figure out, after days of random tinkering:

The problem is that Windows expects at least 6mb of free harddrive space at the beginning of the drive in order to start the installer.

GO FIGURE.

So I booted back into Ubuntu (9.04!) and fired up gparted. Took 12mb off the front of my oversized grub partition and restarted.

TADAAA!

The windows installer starts up great.

Microsoft really doesn't like anything but a virgin harddrive, I guess.

Wednesday, March 11, 2009

Sprunge.us

IRC breeds unusually useful tech.
What happens when a scrub comes into your channel and proclaims "I GET THIS ERROR" and pastes 30 lines from his log file for you to read.
Great..
Enter Sprunge.us.
Now said scrub can enter this into his terminal:
cat thatlogfileinquestion.log | curl -F 'sprunge=<-' http://sprunge.us

The output is something like:
http://sprunge.us/TTWP (or some other random assortment of characters) which can then be pasted to where ever.
The link will contain the complete unabridged text of thatlogfileinquestion.log.

sprunge.us: saving the world from channel flooding.

Labels: ,

Conkeror: a sign emacs has taken over your brain.

So I'm writing this post in Conkeror.

At first I thought it was just a cute little Firefox extension that added a few emacs commands to make browsing a little easier.

Oh boy, was I pleasantly wrong.

Conkeror is not just a Firefox extension. Conkeror is just about a Firefox replacement. It runs with XUL Runner, so it's got all of the functionality of Firefox with a completely new interface, modeled on Emacs.

Some quick things to give you an idea:

C-x C-f - opens a new URL into a new buffer
C-x b - opens switch buffer, so you can change between open pages. (basically: tabs are replaced by buffers)
B / F - forward and back. These take a tad bit of remembering but it's not too bad.
f - opens 'follow' overlay. This will highlight every 'followable' link on the page, which have corresponding numbers. You can either type the number or the text in the link to open the corresponding page.


Best of all: I no longer feel strange when editing text in an input box, or text area. All the basic text navigation works perfectly.

It doesn't have some of the nice things real emacs has, such as M-} and M-{ for navigating between paragraphs, but overall it's far superior to needing a mouse.

It's been a joy to use so far, with my initial impression. If you're an emacs junkie, give it a shot.

Also: Conkeror is a horrible name. I dove into the files and renamed it Firemacs. ;)

Next step: figuring out how to get adblock.

Labels: ,