Monday, February 20, 2012

Installing PostgreSQL on Lion with Brew

I had some issues with Python when trying to upgrade PostgreSQL install on OSX Lion.

Basically the configure script is saying that my system version of Python doesn't have 64-bit support.

Warning: Detected a framework Python that does not have 64-bit support in:
/Library/Frameworks/Python.framework/Versions/Current/Python

To fix this issue, you may need to either delete the version of Python shown above, or move it out of the way before brewing PostgreSQL.


I don't like those solutions very much, and I don't need Python support in Postgres anyway. To get around the problem and build Postgres without Python support at all, just...

brew upgrade --no-python postgresql

Muskets at dawn!

Wednesday, January 25, 2012

Bundler invalid byte sequence

Running "bundle install" today gave me...

ArgumentError: invalid byte sequence in US-ASCII

Normally I use Terminal.app but I recently switched to iTerm as I'm finding it is quite a bit faster, so this little issue caught me out. iTerm doesn't enable UTF-8 by default.


Adding this to ~/.bash_profile will set it no matter what terminal app you're using.

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

Monday, August 8, 2011

Angry Birds Not Working On OSX

I noticed a month or so ago that the online version of Angry Birds  has stopped working. That is a bit of a shame, I really enjoyed it.

So out of curiosity I took a peek at the Javascript console for some clues as to why it doesn't work. Ah, ok. 31 errors. The first one is.

XMLHttpRequest cannot load http://r2303.latest.project-slingshot-hr.appspot.com/cors/fowl/sprite_sheets/INGAME_BIRDS.json. Origin http://chrome.angrybirds.com is not allowed by Access-Control-Allow-Origin.

Ah, that old chestnut. Origin is not allowed by Access-Control-Allow-Origin. Basically the game resources aren't being loaded. Simple.

So it looks like I'll have to continue being productive rather than feeding my time to the birds until someone updates the crossdomain.xml file which is currently a 404.

Thursday, July 8, 2010

Rolling Back iPhone iOS4 to iPhone iOS3

Installing iPhone iOS4 on my iPhone 3G and it was a big mistake for me. My iPhone instantly changed from a lovely, responsive device, to one that was taking 15-20 seconds to start up the SMS or Mail applications.


The list of issues I had with iOS4 was long and uncomfortable enough to force me into deciding to rollback to iOS3.


  • Slow to start applications
  • Applications are generally slow and unresponsive
  • Camera app was slow to start, and slow to take a picture
  • 3G network access became unreliable
  • Lockups and freezing requiring restarts

It was slow and buggy enough that I hated using my phone at all. I didn't get this phone to become the owner of a useless brick.


Waiting for the first update to iOS4 seemed like a lame idea. Who knows how many of the issues would be addressed anyway?


iTunes won't directly allow you to rollback to a previous OS just by choosing a backup that was on that OS version. It doesn't downgrade the operating system, it only restores the data.


Trying to restore an earlier firmware explicitly in iTunes got close, but also failed.


It turns out there is one more step needed to make the rollback work... RecBoot. @pjammer sent me a link to a YouTube video showing how to rollback to iOS3, which worked a treat.


After restoring the earlier firmware you will receive an error message telling you the OS could not be restored and you should choose one of your backups to restore from. Running RecBoot at this point in time allows you to take you phone out of recovery mode.... to find the firmware of your choice running.


You can then restore your data or setup for a new phone.


Victory!


Guess what? My iPhone 3G is fast again. I'll be researching very cautiously before attempting another upgrade to iOS4.

Wednesday, June 30, 2010

Installing Postgres gem on Snow Leopard

I had to jump through a small hoop to install the postgres gem on Snow Leopard so I'm putting it here to help others out. Hopefully it saves you some time.


Basic System


  • Ruby 1.8.7
  • Macports
  • OSX 10.6 (Snow Leopard)

Install Postgresql


# sudo port install postgresql84-server

Install the Postgres Gem


# sudo env ARCHFLAGS="-arch x86_64" gem install postgres -- --with-pgsql-lib=/opt/local/lib/postgresql84 --with-pgsql-include=/opt/local/include/postgresql84

Saturday, May 8, 2010

Basic Gym Etiquette Is Cool

There is some basic gym etiquette that most people understand and follow without ever being told, or even without thinking about it. These people probably fit very easily into life and society in general without much effort. They're easy to get along with, considerate, clean and polite. Everybody loves them.


Then there are those other gym users. You might know the ones I mean. The inconsiderate, dirty, and loud gym users.


This stuff is common sense but apparently not everyone has enough to spare, so here it goes...


Wipe Down Equipment


Nothing... I repeat, "Nothing"... is more revolting than going to use a bench that is covered with someones sweat. So the next user of the equipment is expected to use their towel to wipe off that 10 litres of sweat? What the hell is wrong with you!? Wipe it down when you're done.


There are signs everywhere about this at any gym, but I don't think the offenders in question care.


Wipe down equipment after you use it. It takes about 2 seconds. If you don't you're a pig.


Put Equipment Back


You got the weights of the rack. You used them. Then you just walked away. You're not a very nice member of the Gym world are you?


I'm not your Mama! Put your own damn weights back where they belong. I know you just lifted a personal best. Awesome. I'm sore and tired too. Why should I put them back for you?


A lovely side effect of everyone putting equipment back after use is that everyone can find it easily. Bonus!


Share Equipment


Nothing is more annoying than someone commandeering a piece of equipment for a long period of time. If you're going to be using something for quite a while the least you can do is get on, do your thing, then stand aside a moment. This makes it easy for others to approach you and ask if you mind if they "cut in" for a set.


Phone Calls


This point deserves a post all for itself!


Do you really think everyone in the gym wants to listen to your marathon phone call? Walk away from the equipement, go and find somewhere away from everyone. Talk your ass off as loud as you want there.


Don't Throw Your Weights


We all know how awesome and powerful you are. Your strength makes me quiver. But do you need to drop your weights from as high as possible?


We all know you rock even if you just put the weights down.


Clean Gym Attire


Don't turn up to the gym in the same gear that is still soaking wet from your last workout.


My favourite gym member is the one that sits on a bench, sweating like a pig with no towel in sight, totally surrounded by the 5 different sets of dumbells they've been using while talking on the phone the one of their mates about the awesome babe they almost picked up Friday night. You're a filthy pig. I doubt you were going to pickup either.


Is any of this that hard?


I would love to see the trainers that walk around the gym pull people up for breaking etiquette but they won't for fear of upsetting a paying member. What about the majority of gym users that have to train in the same gym as the above mentioned gym users? That's the majority of your paying customers. Look after them.

Monday, April 26, 2010

Mishca's Mothers En Vogue Photoshoot

Mishca had a photoshoot for Mothers En Vogue on Nov 25th 2009.

She went really well considering she was such a shy little girl just a few months ago :)

Well done Mishca!

Sunday, April 25, 2010

Facebook Makes More Of Your Data Available Again

Facebook is once again making more of your data available without your permission.

I was very disappointed to see that I was suddenly opt-ed in to basically sharing everything about me, and allowing my friends to also share this information about me. I never gave my explicit permission to do this. I'm sure it is entirely covered by their Terms and Conditions.

At a minimum, Facebook should have asked users what their preference was, but chose not to do so. This is an extremely deceptive practice, somewhat similar to lying by omission.

Yes, I am aware I can change the settings. I also know most people won't because they don't care, are too lazy, or just do not understand how much they are "sharing".

I also love how giving away your personal information is called "sharing" now. How very, "double-speak" of Facebook. To be fair Facebook aren't the only social networks that shares you information to their partners.

As an individual that still has dreams of privacy I simply do not like where this is going. I was hesitant about joining Facebook to begin with because I could see the depth the data that would allow information seekers to build very detailed profiles on each of us. I even deactivated my Facebook account once before giving in and re-activating it.

So, I'll announce it to the world...

I will be deleting my account on or before 25 May 2010, using Facebook's Delete my Account page.

Deep down I am not at all surprised by the direction Facebook is going with this. My lack of surprise also reminds me that although I was quite sure it would get to this point it was a stupid decision ever choosing to believe it could would have been any different.

Bye bye Facebook. It has been... educational.

Links

Monday, January 18, 2010

Howto Install Ruby 1.8 and RubyGems from source on Debian

In the latest addition to the, "Howto Install stuff from Source on Debian", series, this post shows how to install Ruby 1.8 and RubyGems from source on Debian.

This installation has been tested out successfully on Debian Lenny, and Debian Etch. It should also work on Ubuntu.

Permissions

As noted in my last post, my user has write permissions to /usr/local/src so I don'thave to run everything under sudo. This was accomplished by allowing the staff group to write to /usr/local/src , giving write access to the staff group, and adding my user to the "staff" group.

If you would like to set this up...

# sudo chown root:staff /usr/local/src
# sudo chmod 775 /usr/local/src
# sudo usermod -a -G staff your_username

If you were not previously a member of the staff group you will need to logout and login again, or just open a new shell, for the changes to take effect.

Install

A browser friendly version of the script can be seen at http://gist.github.com/271029.

Once again, I've leveraged gist as a tool to store my installation scripts.

The script is just a wrapper to install the necessary Debian packages. This script then downloads a second script which actually downloads, configures, and install Ruby 1.8 and RubGems.

Not only is gist a very useful tool, but I've also found GitHub to be an excellent online git repository.

The scripts use the "Raw" versions of the gists.

To install, run these commands...

# wget http://gist.github.com/raw/271029/d16c8acf620047b88e509ccab205959681fd443d/install_ruby18_on_debian.sh
# chmod a+x ./install_ruby18_on_debian.sh
# ./install_ruby18_on_debian.sh

If all goes well, Ruby and RubyGems will have been installed.

# which ruby
/usr/local/bin/ruby

# ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]

# which gem
/usr/local/bin/gem

# gem -v
1.3.5

Enjoy Ruby!

Other Posts in this Series

Friday, January 15, 2010

Install Nginx from source on Debian

I thought it was time to write a followup post to, Install Memcached from source on Debian Lenny.

At this moment, Debian provides Nginx 0.6.39 and I was wanting to run Nginx 0.7. The latest stable version is 0.7.64, so I thought I would put together a script to automate the download and installation for me.

Some devoted Debian users will want to string me up for installing a source package, and some others will no doubt say that I'm hating Debian for not using aptitude. These people are entitled to their opinion of course, but I don't feel that there is anything wrong with installing a source package on Debian.

If you feel like installing a package from source makes Debian cry, leave now :)