My New Project: Formr
Build a form in < 10 lines of code, with server-side validation and full Bootstrap implementation - right out of the box.
http://formr.github.io
Monterey Bay Aquarium

ellievsbear

roma★
occasionally subtle
he wasn't even looking at me and he found me
"I'm Dorothy Gale from Kansas"
🪼

tannertan36
tumblr dot com
we're not kids anymore.
Claire Keane
ojovivo
Jules of Nature
No title available
PUT YOUR BEARD IN MY MOUTH
taylor price
I'd rather be in outer space 🛸

Origami Around
hello vonnie
Misplaced Lens Cap

seen from T1

seen from Italy

seen from United States
seen from United States

seen from Germany

seen from United States
seen from United States
seen from United States
seen from United States

seen from United States
seen from Singapore
seen from United States

seen from United Kingdom
seen from United States
seen from Israel
seen from Malaysia
seen from United States

seen from Malaysia
seen from Guatemala
seen from Malaysia
@timgavin
My New Project: Formr
Build a form in < 10 lines of code, with server-side validation and full Bootstrap implementation - right out of the box.
http://formr.github.io
A small PHP/mySQL application for uploading and displaying image galleries using Rackspace Cloud Files
Install ImageMagick with MAMP Pro 3
It's really simple to install ImageMagick with MAMP Pro 3
Open MAMP Pro
Go to File > Edit template > PHP > PHP 5.6.x
The php.ini file will open.
Go to File > Find, then search for magick
Uncomment the following line
;extension=imagick.so
so that it's now
extension=imagick.so
Save the file, close it and restart the server. That's it!
Set Encoding in ezSQL
When creating a new connection just set the fifth parameter to the encoding you desire and ezDB will run a 'SET NAMES' query with your preferred encoding after making the connection. Really easy!
$db = new ezSQL_mysqli( 'username', 'password', 'database', 'localhost', 'UTF-8' );
How to Run a mySQLi Transaction in ezSQL
// begin the transaction $db->query('BEGIN'); // run all of your queries here... // commit the queries if($db->query('COMMIT') !== false) { // transaction was successful } else { // transaction failed, rollback $db->query('ROLLBACK'); }
Tumblr OAuth for Tumblr API v2
Example code and screencast for integrating Tumblr OAuth into your PHP project.
https://github.com/timgavin/tumblroauth
Handle errors in ezSQL
If you use ezSQL you know the global error array $EZSQL_ERROR is crap and doesn’t work, which makes it difficult to see what’s really going on when running UPDATE queries.
So how can you tell if a query was successful or not?
Like so…
if($db->query($query) !== false) { // query was successful return true; } else { return false; }
Laravel 4 & MAMP Pro: Installing via Terminal A brief step-by-step guide on how to install Laravel 4 via the Terminal so it plays nicely with MAMP Pro.
plurals in php
Sometimes it's a pain in the ass to figure out when to add an apostrophe or the word "is" instead of "are", etc., especially if you're grabbing data from a db, or some other blind source. So I've whipped up a couple of basic (no frills) functions to do just that. They're available as Gists. Hopefully they're helpful.
Here's a little sample
<?php $name1 = 'Chris'; $food1 = 'gyro'; $total_food1 = 1; $name2 = 'Tim'; $food2 = 'beer'; $total_food2 = 20; ?>
echo 'That salad is '.plural($name1);
Produces That salad is Chris'
echo 'There '.are_is($total_food1).' '.plural($food1,$total_food1);
Produces There is 1 gyro
echo 'That pizza is '.plural($name2);
Produces That pizza is Tim's
echo 'There '.are_is($total_food2).' '.plural($food2,$total_food2);
Produces There are 20 beers
Connect Your Site to Tumblr With OAuth
How to connect your site to Tumblr using OAuth, PHP and MySQL. Tutorial files available on GitHub