Posted 1 month ago
2 Notes
I was just asked on Twitter how I built KLCK, so here is a pretty good break down of the technology and the order things were done.
For quite some time I have testing and working on different systems and frameworks. I love Python but didn’t really want to host this app on app Engine and I have been doing a lot of PHP work lately. I have done a site in Ruby on Rails but find it quite complicated to come back to you if you dont do Rails fulltime, I had such a horrible experience hosting Ruby that its really put me off Ruby & Rails, but I love Ruby as language (yes I know about Sinatra). So this was the technology of choice, probably because it is easy to host and configure and pretty solid at the end of the day (even if it is a bit ugly at times).
So to start off with I built www.ChairBro.co.nz which is powered by 1 file, index.php.
This uses a super simple framework called Silex http://silex.sensiolabs.org/
Silex allows you to run your whole website from 1 file and manages all your routes etc. Its simple and flexible.
To make things super simple, the HTML uses Smarty Templates http://smarty.net/ which allows you to inherit and extend your HTML files. In essence you can create a master template file and inherit this into other templates. Choosing smarty was the best choice I made here. One thing about smarty is that it will compile your templates+code on the first run. So you templates are not parsed on every request, they are parsed once and then turned into pure PHP code. So KLCK, ChairBro run render super fast on the server.
I am a real fan of ORM databases, and love this one called Red Bean PHP http://redbeanphp.com/ which allows you to quickly get a DB up and running, I used MySql for the database but for some projects I have used Sqlite. I do recommend MySql for you DB. Red Bean allows you to keep away from SQL (you can still uses it though) so you focus on manipulating object, not SQL statements.
For image manipulation and cropping. http://shiftingpixel.com/2008/03/03/smart-image-resizer/ which basically allows you to manage image resizing on the fly. Super simple.
Finally after ChairBro was built I decided to create KLCK using the same engine but different design and different categories. Because I used Smarty for my templates I only had to create a new master template for the site and with some tweaks, I have 2 sites running of the same code base.
How big is it all. Well the 2 sites run off 1 index.php file which is about 900 lines long. This includes lots of comments and some other functions I am not using.
Result: Love it. Its simple, separated, DB code is terse and concise, templates are logical and very easy to move around and manipulate. runs fast.
Posted 1 year ago
via pilotmoon
474 Notes
You might have learned that a certain upcoming version of Mac OS X may have scrolling that is “bass-ackwards”.
That is, when you push up on your trackpad or mouse scroller, the page content moves up too, just like on iOS devices.
I made a very minimal little app that lets you reverse…
Source: pilotmoon
Posted 1 year ago
2 Notes
If you’re concerned whether the ipa file is properly created, go ahead and repeat the Share Application step but save the file to the desktop instead of opening it in Mail. Then unzip the ipa file and look into the Payload folder that is extracted. Inside, you’ll find an application bundle, and inside there, you’ll discover the embedded provision file. Load the file in TextEdit to confirm that the proper UDIDs have been included in the provisioning file.
Source: tuaw.com
Posted 1 year ago
A must read on some funny facts about photos and attractiveness.
Source: blog.okcupid.com
Posted 1 year ago
4 Notes
Get the XT Prepaid Mobile Broadband 500MB - you don’t have to pay monthly - Confirmed By Telecom ^JL.
If you use your iPad now and again outside of your wifi zone. You could get 500MB of data from Vodafone or 2º but it’s going to cost you $20/month. You must also pay every month. On XT Prepaid Mobile Broadband 500MB, you pay for what you use and have 6 months to top up.
You need to tell them at the Telecom Store that you want the 500MB Mobile Broadband prepaid rate on the sim when you buy it. (they will probably look at you confused).
The cheapest is $29.95 (it says per month, but it should say, “500MB of data capped at 29.95”).
http://www.telecom.co.nz/mobile/mobilebroadband/plansandpricing/prepaid
This 500MB prepaid rate basically means you pay 10c/Mb up to $29.95 which is 300MB. Then you get a free 200MB if use that in a single calendar month.
At the bottom of this table is says.
“If you use less than your data allowance you’ll only be charged for what you use, and your credit balance will roll over to the next calendar month.”
Which means if you use only 100MB in a month, you only pay $10. If you use 300MB in one month you are billed $30 and if you use 500MB of data in 1 month you will be still be billed $30. You can add another 500MB though by topping and getting 1GB for $60 (I am rounding my values up to make my example clearer).
You must top up every 6 months.
“Any top-up credit needs to be used within six months otherwise it will expire and you need to make sure you top up at least once every six months to avoid your Prepaid account being deactivated.”
http://www.telecom.co.nz/mobile/yourmobile/topup (Heading - By the way, just so you know…)
This means if you use you iPad now and again on 3G it’s pretty good, if you need heaps of data, eg 500MB to 1GB this plan is good.
You can see lots more options here if you have more data requirements.
http://www.whiteandblack.co.nz/2010/07/ipad-data-plans-comparision-xt-vodafone-and-2-degrees/
Thanks to Matthew Buchanan for his assistance with pulling the correct data together for this post.
Posted 1 year ago
Creating RSA keys for OSX / Linux
Source: geektimes.com
Posted 1 year ago
Photoshop - iPhone App Icon Export for iPhone 4/3 Touch and iPad.
Creates all 6 icons sizes that are required for these devices from homescreen, retina display, spotlight search
1. To use this script, double click the script file, photoshop will launch and ask you for a 512x512 icon file of any
image format (jpeg, psd, gif, png etc.)
2. Select the file and photos shop will create 6 icon files and save these with the correct names in the save folder as
the 512 image.
3. Add these images into your iPhone project and update you app plist.
Read Apples Q&Q 1686 on how to add this icons to your info plist
http://developer.apple.com/iphone/library/qa/qa2010/qa1686.html
Source: github.com
Posted 2 years ago
40 Notes
HTML5 video player, fallback support for IE, Opera, works with iPhone and supports, h.264, ogg and webm
Source: videojs.com
Posted 2 years ago
More details on all the commands to make your own.
http://www.erasetotheleft.com/post/mac-os-x-key-bindings/