Vacature: (Cake)PHP Webdeveloper bij startup EduHub
Posted by primeminister | Filed under Other (tech) stuff
EduHub zoekt nog een webdeveloper! Leuke club in Amsterdam en aan de slag met CakePHP.
Weet jij nog iemand of zie je jezelf daar aan de slag gaan? Laat het Ruben weten en gebruik coupon code CAKETOPPER
Are you coming to the dutch CakePHP borrel?
Posted by primeminister | Filed under Cake-Toppings, Other (tech) stuff
Very excited to see all of you dutch (and belgian) bakers next tuesday! The food is ordered, the drinks are cold and the snow is falling. What else do we wish for?!
Spoken words:
Ruben (@rubzie) did announce already some presentations: http://www.singel146.nl/2010/01/cakephp-borrel-show-your-code-meetup/
I (@charli3) created a LinkedIn event. Let us know if you are planning to go: http://events.linkedin.com/Dutch-CakePHP-borrel/pub/193797
See you there!
Dutch Borrel: Show-Your-Code Meetup
Posted by primeminister | Filed under Cake-Toppings
Finally! The dutch CakePHP meetup number 1 also know as Dutch Borrel.
It will be on Tuesday Jan 12th. 2010 in Amsterdam. To get to know eachother we’re not only talk and drink. We are gonna really meet eachother… through code.
Dutch Borrel #1: Show-your-Code Meetup Amsterdam
AJAX pagination with jQuery and elements
Posted by primeminister | Filed under Cake-Toppings, jQuery/javascript
A simple way to get your paginated data in your view through ajax with jQuery. Thanks to Cesay Dreier and his article at the bakery http://bakery.cakephp.org/articles/view/easy-ajax-pagination-using-jquery.
I changed the code a bit because I use elements in an extensive way. So here is almost the same code but now with an element and some updated javascript code.
I used the latest CakePHP 1.2.5 and did nothing to the layout. So the classes or id’s will be of the default CakePHP layout. I added the blog tutorial posts table and some data.
1. Add to your controller (or AppController):
// my posts controller looks like this
class PostsController extends AppController {
var $name = 'Posts';
var $components = array('RequestHandler');
var $paginate = array('limit' => 10);
function index() {
$this->Post->recursive = 0;
$this->set('posts', $this->paginate());
}
}
Amazon eCommerce datasource
Posted by primeminister | Filed under Cake-Toppings
I just pushed the Amazon eCommerce API datasource to gitHub: http://github.com/primeminister/CakePHP-Amazon-eCommerce-datasource
With this datasource you can easily get listings and items from Amzon in the books, music, etc categories.
You need an access key and secret key from http://aws.amazon.com. Please see the README file in the repository and check the Amazon API at http://docs.amazonwebservices.com/AWSECommerceService/2009-10-01/DG/
Please fork the code if you have optimizations, suggestions, etc. or leave a comment.
Improved music site: Cloudspeakers.com
Posted by primeminister | Filed under Cake-Toppings, Other (tech) stuff, jQuery/javascript
One of the CakePHP projects I have is the site named Cloudspeakers.com. In the last three months we improved the website with new features, gave it a complete new layout and did a lot about the usability.
All is build on the latest stable CakePHP core 1.2 and jQuery 1.3
Read full press release here: http://bit.ly/4zUxj2
Removing cache after shell script is done
Posted by primeminister | Filed under Cake-Toppings, bash
I have a scraper that runs every 6 hours and adds reviews, audio and video of the found music artists to our database. The problem is that I wanted to cache elements and views for minimum of 1 day and let the scraper remove the cache when it found new items.
Firts of all I use file caching. I tried with Clear::cache(false); at the end of the shell script but that didn’t work. I guess the file list is too long.
The I had a simple bash script that just stated
rm -f tmp/cache/views/element*
But the list was too long and it give ‘Argument too long‘ warnings. Then I had a look on the internet (Wait… what is that?) and created my own long-list-removable-view-files-bash-script:
#! /usr/bin/bash find ./tmp/cache -name 'cs_*' | xargs rm -f find ./tmp/cache -name 'cake_*' | xargs rm -f find ./tmp/cache/models -name 'cake_*' | xargs rm -f find ./tmp/cache/models -name 'musicbrainz_*' | xargs rm -f find ./tmp/cache/persistent -name 'cake_*' | xargs rm -f find ./tmp/cache/views -name 'element_*' | xargs rm -f
It does not only views removal, but I use this script also for new release deployment.
After I had finished this @savant pointed me to the PDF Math Curry where he pointed out the same… Damn!! :)
