Jailbreak an old iPhone 3g with redsn0w

My old iPhone 3g has been sitting around with a broken screen for a few years now, recently found it and thought i’ll see if i can resuscitate it! No SIM (don’t need one in it) so couldn’t do a lot, jailbreak it is… (i have never jailbroken a phone before) Took some finding to […]

wget – ignore robots.txt rules when grabbing site files

Simply do: wget -r -e robots=off –wait 0.25

SVG Not Displaying

  • September 11, 2013
  • Apache

I’ve just been configuring and setting up a server environment for a project i’ve been building. Everything working at it should, except my SVGs were not showing. In this instance, Apache doesn’t know how to serve them up, so I added the following lines to a .htaccess file in the document root: [code] AddType image/svg+xml […]

fuelphp simpleauth – group or group_id

There’s an error here: /packages/auth/classes/auth/login/simpleauth.php line 257: ‘group_id’ => (int) $group, should actually be: ‘group’ => (int) $group, otherwise you will get an error when generating with Oil.

Setting a default order_by in related models using fuelPHP

Notes on the system i’m building: A user has many sets of related data, one set being a list of quote item rates which get used (to form a dropdown) when a user is creating a quote item, this list of course needs to be ordered correctly, as the user can manage these items, deleting, […]

Setting up MySQL on Mac OS

A few notes for next time… and this may help someone else you never know! Even after doing this multiple times it’s easy to forget a step and wonder why things aren’t working. After moving all my data to a new mac, i need to install mysql. Install mysql. (Grab a .dmg from Move […]

fuelphp custom configurations

I recently built my client management / quote / invoice system using fuelPHP, and needed to add some defaults settings when a new user registers to use the system. For example, a user signs up, their details are stored in a users table, but users also have settings such as quote item rates (£30, £40, […]

fuelPHP Related Models

Just as a point of reference, nothing here that isn’t in the fuelPHP documentation. Using fuelPHP Related Models. All relationships are declared in the Model of course. Belongs to A quote will belong to a client, and also a user. [code] protected static $_belongs_to = array( ‘user’ => array( ‘key_from’ => ‘user_id’, ‘model_to’ => ‘Model_User’, […]

Pagination in fuelPHP

We always need pagination for displaying many records. fuelPHP makes this easy for us: [code] $countQuotes = count(Model_Quote::query()->where(‘user_id’, Auth::instance()->get(‘id’))->get()); $pagination = Pagination::forge(‘pagedquotes’, array( ‘pagination_url’ => ‘/quotes/’, ‘total_items’ => $countQuotes, ‘per_page’ => 10, ‘uri_segment’ => ‘page’, )); $data[‘quotes’] = Model_Quote::query()->where(‘user_id’, Auth::instance()->get(‘id’))->limit($pagination->per_page)->offset($pagination->offset)->get(); $data[‘pagination’] = $pagination->render(); [/code] And in the View: [code] <table id="quotesTable" class="table table-striped"> <thead> <tr> […]