How to downgrade iPhone 3.1.3 to 3.1.2 & Jailbreak

Meta: February 08 2010 // iphone // Comment // 14 views

So I accidentally upgraded my iPhone to 3.1.3, bad news bears. I lost my jailbreak with no look of getting it back, especially on a newer bootrom. After playing around for hours on hours I finally locked it down to this workflow:

  • Open up iTunes. It doesn’t matter what version it is. Then click on restore with shift (win) or alt (mac) held down. Select the firmware for 3.1.2. You can download the firmware you need over at http://www.felixbruns.de/iPod/firmware/
  • Wait for that to go through. You will probably hit an error 1050, which is no problem. Download redsn0w version 0.9.4. There are plenty of links out there. Load up the 3.1.2 firmware in that and then let it do its magic. It will probably hit the part where you need to activate and what not. I let me phone activate and enter a standard 3.1.2 state. But no cydia or jailbreak tools
  • Next i loaded up blackra1n and let it do its jailbreak. I had to do this twice to get in, so then i could install cydia.

Now I have my iPhone back onto 3.1.2 and i don’t think i am going to bother with jail-breaking the 3.1.3.

Tags: , , , , , , , , ,

Fixing Vi and Arrows in Insert Mode

Meta: January 20 2010 // Technology // Comment // 10 views

Recently I moved one of my sites onto another server, different installation. I noticed when i was working in Vi in insert mode my arrow keys would insert their values instead of navigating around the text. To fix this:

  • Make a new file in your home directory valled .vimrc
  • Inside it put in:

    :set backspace=indent,eol,start
    :set term=builtin_ansi

Now that global setting should be applied whenever you are working with files in vi and your cursor navigation troubles should be no more!

Tags: , , , , , ,

The Year of 2009

Meta: December 27 2009 // Ideas // Comment // 9 views

It’s been quite a turbulent year this year. Kicking it off it began with a temperature of -35 on New Years day, lots of cleaning up from the celebrations the night before but more holiday fun ahead in Canada. Travelled through Western Canada with my awesome Canadian partner and got to see college life first hand.

After leaving Canada it was time to set up some projects and learning. Having programmed in PHP for a few years, at a hobbyist level it was time to step it up and bite the bullet and jump into the long avoided frameworks. A quick touch back to Django had me scratching my head again at the challenge of learning a new language alongside a framework methodology I had no idea about.

A friend of mine from Germany recommend that I take a decent look at the CakePHP framework and after getting my head around why I would abstract my functions out into an MVC structure I got going on building up the projects that I had started by nowhere near completed.

My podcast hosting project got off to a decent start, blazesyn.com, but then hit some big walls, of which I plan to get around in the new year. This got my CakePHP and PHP skills up to much stronger level. My partner, after killing her University degree came down to Australia to live, landing in May. We took some time out, and travelled around Brisbane and down to Melbourne, enjoying the time together to make up for time lost. However the holidays slowly ran down as the bank dried up.

In the mean time I stumbled on an idea while on Holidays, an idea that I had roughly three years ago, but the plans fell through due to costs. It was a decal/signage business purely online. Luckily I had built up my CakePHP skills and got straight to work on wedecal.com which has been going strong. We’ve invested a decent amount of money into advertising and we’re seeing the return slowly climb as the repeat business kicks into effect.

Then I got lucky, I received two expressions of interest for full time work through this blog at jotlab.com. One position was working remotely for a fashion website in Sydney. That fell through, poor communication, which is something you simply can’t have when working remotely. I pulled the pin on that one, but as soon as I did a new opportunity opened up. A local advertising agency contacted me, again through this blog, saying they’ve been following my topics on CakePHP and they would like to offer me a full time position as a CakePHP developer in Brisbane.

I jumped at the opportunity. The workplace was a pad, it had a BBQ area, a swimming pool and the whole place was a decked out church! What’s more they put on a free lunch and beer every Friday afternoon, that’s my kind of work environment. The profile of the clients was jaw dropping and the projects were always challenging. I was on a three week trial then the work ran out. I was back to looking for work.

It was job time and I was sending out resumes to pretty much any web development or web related job I could find. The replies came in, recruiters were calling, positions were opening up and everyone was interested, but not on the terms I wanted. Then I got a phone call from the church of CakePHP, they wanted me back, this time it was I writing for a full time position, and that’s where I am now.

As for development, I am aiming to getting a bit deeper into the CakePHP core. Understanding the inner workings and what seems to be a large array of undocumented CakePHP functions. Besides that I really want to get into Ruby on Rails. It was a bit unnerving to see the CakePHP team split as a core dev moved to create his own branch/framework based on CakePHP3. If i do get extra time it’s onto iPhone development, however one step at a time.

And that is my year of 2009, in terms of development, work and travel. As for next year, our concentration is on moving closer to our workplaces and visa’s. Let’s hope Australia deals us an okay hand for 2010.

Tags: , , , ,

My Cool New iPhone Theme

Meta: December 03 2009 // Technology // 1 Comment // 38 views

IMG_0056

I finally got around to jailbreaking my iPhone. Although blackra1n requires that my iPhone be tethered and re-jailbroken after each boot, it still allows me to get access to a heap of apps previously impossible to load up, plus this awesome theme called Suave! I still need to work on adding new icons that aren’t yet available. But still :)

Tags: , , , , ,

Zen Coding

Meta: November 24 2009 // Programming // Comment // 19 views

Zen Coding v0.5 from Sergey Chikuyonok on Vimeo.

Tags: , , , , ,

Agile Web Development with Rails – 3rd Edition

Meta: November 17 2009 // Books // Comment // 24 views

Photo on 2009-11-17 at 12.56

Yes i’m a book addict!

Tags: , , , , ,

How to use FileMerge with Git as a Diff Tool on OSX

Meta: November 16 2009 // Programming // Comment // 244 views

As I’m migrating from Subversion brainwaves I’ve been slowly adapting my workflow into Git’s. Problem was i was finding it hard to double check changes in my working folder to that of what was previously committed. In other words I missed the love of FileMerge.

So I began puttering around on the internet and found people writing scripts for git’s external diff editor. But they were missing one important element, the location of OpenDiff to save to! So I did this:

Firstly we need to make the script that git will run when it runs it’s diff. To do this run:

vi ~/git-diff-cmd.sh

Then we will drop some script in here which basically routes the diff statements generated by Git to the OpenDiff application

#!/bin/sh
/usr/bin/opendiff "$2" "$5" -merge "$1"

Notice the “-merge "$1"” this is the destination to save to. Before hand with other people’s code you would have to manually select the save path. But i did a man opendiff on it to realise all it was, was setting the merge path!

Anyhow. Save that via pressing “shift + ZZ” Saved! Next we need to make that file executable via “chmod +x

All that is left is to tell Git to use this script as it’s diff editor, which will then invoke the FileMerge (OpenDiff) program. To do that type in:

git config --global diff.external ~/git-diff-cmd.sh

Now how i check my staged files with the previous commit would be:

git diff --cached

Which would then open up all the staged files and allow me to choose which one i wanted to keep or not :D

Tags: , , , , , , ,

JotPad – TextMate Theme

Meta: November 10 2009 // Technology // Comment // 62 views

screen

Recently i started playing with TextMate because of all the hype and the billions of shortcuts it has. This was a big shift from the editor Coda.app on the Mac. Immediately i was taken by the ability to have themes! So i decided to create one myself. Adapted from the eclips3.media theme freely available.

Simply download and double click on the following theme:

JotPad.tmTheme.zip

If you wish to use the same font as me then you can download the Bitstream Vera Sans Mono font from:

Bitstream Vera

This is v1.0 of the theme, if updates happen in the near future i’ll write up the changelog here!

Tags: , , , , , , , ,

Installing Ruby on Rails + MySQL + Imagemagick + Nginx + Passenger With Macports OSX

Meta: November 08 2009 // Software // 1 Comment // 494 views

This was one epic battle for me when i tried to get rails going with Lighttpd. But with that said, i have been spending quite sometime on just getting my development environment up and running on an environment similar to how i would deploy the app. So this is how i managed to get Rails up and running with Nginx.

First you need to download and install macports. You can get it from: http://www.macports.org/. Install that, it may take some time, but it’s well worth it!

Next we need to get some updating going on, so that your sources are up to date and fresh to get some ports installing. Open up terminal and type:

sudo port -v selfupdate

The -v is for verbose output, so you can see exactly what is going on. After that is complete lets going with installing ruby and some rails.

First we need to install ruby. To do this type:

sudo port install ruby

This will go ahead and install ruby. Next up run:

sudo port install rb-rubygems

This will allow us to access the awesome gems feature that allows you to import third-party gems, or plugins. Once that has been installed you will want to run an update, to get the latest gems sources. This can now be done through the gem command.

sudo gem update --system

To add support for Imagemagick run these commands:

sudo port install Imagemagick
sudo gem install rmagick

Pretty simple hey? Next up we will want to add some support for mysql5. To do this we will go back to our port system and run:

sudo port install mysql5 +server

You will then be shown some hints as to how to set up the test tables and run the secure installation. I would recommend doing this as it allows you to setup your root password and clear test tables. Just follow the onscreen prompts on how to install it. Some people have permission issues with sockets here, if you are one of them check out this page. Once that is done run:

sudo port install rb-mysql

This will install the ruby mysql adapter. Wait for that to go through next we can add rails! Yep we’re up to that stage already!

It’s pretty simple:

sudo gem install rails

Rails is installed! You can start a new rails app now simply by navigating to the folder where you would like to create the app and typing:

rails app_name

and to make sure that you have mysql support created for you instead of manually type:

rails -d mysql app_name

To test that your app ran smoothly you can simply change directory into your new app and run:

ruby script/server

and this will load up the built in Webrick server, of which you can now navigate to in your browser via http://localhost:3000

If all went successfully then you should see a screen like:
Screen shot 2009-11-08 at 12.13.10 PM

We don’t really want to use this built in server, we want to use Nginx with passenger! And to do that we don’t want to build from source, we want to use the Macports elegance, well i did anyway. Unfortunately macports doesn’t support this off the bat. But with some tweaking its very easy to do. First we will need to grab passenger. This is once again very easy to achieve, thanks to gems:

sudo gem install passenger

Now run:

passenger-config --root

this will tell you where passenger installed and where it’s hiding out. We will need this for telling Nginx where to grab it from. So please take now, paste it to a text file or something.

Next step up is to get Nginx installed. As i said before this will require some hackering. So lets do that first. What we need to do is add the passenger variant which currently isn’t available with the nginx macport. So to do that navigate to the nginx portfile directory, which can be done via:

cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/www/nginx

Deep hey. Lets add the variant. Open it up via:

sudo vi Portfile

press SHIFT + G this will take you to the end of the file, where you should now insert (via pressing the key i) the following:

variant passenger description {Adds passenger support} {
    configure.args-append   --add-module=/opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/nginx
}

Please take note of the “/opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/nginx”. This is too important! You need to change that with your path to passenger, but with /etc/nginx added to the end. So if you get any compiling errors, it’s probably because you didn’t have enough coffee at this step of the process. Once you’ve done this hit ESC to get out of insert mode and press SHIFT + ZZ this will save and close the file.

Next its time to install nginx via the macports system. We will also want to add our variation in. So to install nginx with the passenger module type:

sudo port install nginx +gzip_static +passenger +ssl

Let it do its magic. Once done cd to /opt/local/etc/nginx/. We need to copy the example config files to ones we want to use. So do that.

sudo cp mime.types.example mime.types
sudo cp nginx.conf.example nginx.conf

So all that is left is to add our passenger config and a site. Open up the nginx.conf file via sudo vi nginx.conf

My config file looks like:

worker_processes  1;
events {
    worker_connections  1024;
}
 
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
 
    gzip  on;
 
    server {
        listen       80;
        server_name  localhost;
        location / {
            root   /opt/local/www/htdocs/;
            index  index.html index.htm;
        }
 
    }
 
		passenger_root /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.5;
		passenger_ruby /opt/local/bin/ruby;
		passenger_max_pool_size 8;
		passenger_max_instances_per_app 1;
		passenger_pool_idle_time 3600;
 
		server {
			listen 80;
			client_max_body_size 250M;
			server_name dev.app;
			root /opt/local/www/my_app_name/public;
			passenger_enabled on;
			rails_env development;
		}
}

What you need to pay attention to here is ther location / for root. I.e where it says /opt/local/www/htdocs/ Make sure that exists. Next thing to look out for is the passenger_root /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.5; This is where you get your passenger path from passenger-config --root The next thing is passenger_ruby. This setting sets the path to ruby, and also where ruby will grab its gems with. I ran into an error first with passenger, stating that my gems were too old, and that i should update. But when i went into terminal and did gem update –system it said i had the latest. So it became apparent that passenger was by default using Mac OSX’s ruby version! So you set the path to the ruby you want, in this case, its the one macports installed.

Anyhow. You might be asking well how do i start, stop and restart MySql or Nginx. Well I’ve created some aliases you should add to your .profile file. To do this run:

vi ~/.profile

then add in:

alias nginx-start="sudo launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist"
alias nginx-stop="sudo launchctl unload /Library/LaunchDaemons/org.macports.nginx.plist"
alias nginx-restart="sudo launchctl unload /Library/LaunchDaemons/org.macports.nginx.plist && sudo launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist"
alias mysqlstart="sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist"
alias mysqlstop="sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist"

Save the file, then close down terminal and reload it. You should now be able to run nginx-restart, or start, or stop, same with mysql except for restart. Handy?

You should now be able to navigate to http://localhost and see a success screen, or whatever you have in your htdocs folder. Or if you have set up your hosts file in /etc/hosts to route 127.0.0.1 dev.app then it will show your rails app!

If you don’t you have a problem. tail /opt/local/var/log/nginx/error.log should be able to tell you whats up. Any problems or issues you can’t work out in the first hour by yourself add a comment!

Tags: , , , , , , , , ,

The Doggies @ Work

Meta: November 06 2009 // Work // Comment // 4 views

IMG_0037
IMG_0035
photo

They always come and look who is at their front gate. Then they just stare, trying to figure out what you’re up to. Cute, but very aggressive and they get easily upset.

Tags: , , , , , ,

Entrepreneurs Can Change the World

Meta: November 05 2009 // Videos // Comment // 1 views

Tags: , , , ,

My new Pro Git Book

Meta: November 05 2009 // Books // 1 Comment // 20 views

Photo on 2009-11-05 at 12.44

No this is not me! But it is my new shiny Pro Git book I hope to smash through in the next few days.
I want to start using Git at work for our new projects. No more .svn infectious diseases!

Tags: , , , , ,

Bcee – Generations (S.P.Y. Remix)

Meta: November 01 2009 // Music // Comment // 3 views

A song i have been chasing for a while now.
“I was wrong. And if you should call, it’s no trouble, no trouble at all”

Tags: , , , ,

What’s Been Doing?

Meta: October 29 2009 // Ideas // Comment // 17 views

Well it’s been a long time since I’ve posted pretty much anything on my pages of wisdom here. Which pretty much indicates that I’ve been busy. Very busy, and loving it. I’ve been buried in books and code. My previous employer got me back off the job market and has been prepared to take me on for a full time position as a web developer. If you’ve been following the story on twitter then you will know that I got picked up for a CakePHP developer role through my blog here. That unfortunately fell through because of the demand for work delivered by the company. Which was kind of depressing.

But nevertheless they got back to me, and I’m doing just as I was before and more. I’m in a really excellent position. My co-worker is miles ahead of me in terms of experience with web programming and he understands my position and in turn delegates jobs that are just a little outside of my comfort zone, non-stop. So I’m constantly learning and developing more advanced apps. So yes, I’m always digging through documentation and buying books. I pretty much get up early in the morning, arrive up to an hour early at work, study some bit with coffee. Work all day, drive home, and study my books!

Otherwise we’ve been taking it easy. My partner, who is on a working holiday visa here in Australia is finding it very tough to get any sort of job. We started out trying to get her on track with a her desired career path but none of the companies wanted to hear about it, simply because she was not an Australian resident. With that, we have been striving for just about any work, retail, receptionist, office work and even cleaning. She’s got a degree, a ton of experience, well mannered and presented and just has the best attitude to make things happen, and yet still no luck. If you want to help her out, or know of anyone that could give her a chance that she deserves, so she can stop handing out hundreds of resumés check her out at www.lizzyinbrizzy.com.

What I’m currently looking into now is source code versioning with Git and setting up git repos and access control via Gitosis. Also learning all the PHP functions i can and understanding how to extend CakePHP methods to be more DRY and MVC endorsed. Also this Lithium by Nate Abele, I do want to check this out sometime soon, however had a quick look at the documentation, and didn’t really see much there yet. But alas, the weekend is coming up haha

And with that expect a lot more code snippets and reviews of books coming in the near future! As always if you have any questions or comments please let me know, I’m always up for helping.

Tags: , , , , , , , , , , , , , , ,

My New Book! Zend PHP5 Cert Guide

Meta: October 15 2009 // Links // 1 Comment // 13 views

Photo on 2009-10-15 at 13.39