Tue, 29 May 2007

Drag 'n drop tutorial with the CakePHP 1.2 Ajax helper, Prototype framework and Scriptaculous library

Introduction

During the development of my thesis I wanted to create a drag 'n drop interface. But I never did anything like that, I never used CakePHP's Ajax helper and neither made I ever use of more advanced functionalities of Scriptaculous/Prototype. Hell I even never touched Ajax before this!

Although there are some basic CakePHP/Ajax tutorials out there, I still had a hard time because some knowledge about Ajax (in CakePHP) was assumed in all of those. After a lot of googling I even found a tutorial called CakePHP: Sortable AJAX Drag & Drops - The Basics
"Perfect!" I thought, until after staring at the article for a long while and I started to notice nowhere in the article "$ajax->drag", "$ajax->drop" or "$ajax->dropRemote" is used. (those are calls on the CakePHP Ajax helper to enhance objects to become draggable, or to become a dropbox where draggables can be dropped into). So the only more or less suited tutorial about drag 'n drop was actually about sorting and didn't use the drag/drop function calls at all. Even though it contains very useful information.

Long story short: I finally got it working (thanks to Krazylegz and kristofer and possibly others too, it has been a while so I may forget someone ;-), and learned a lot in the process. I will share what I learned with you guys so that hopefully it's a bit easier for you then what I had to go through.



::Read more

Thu, 19 Jul 2007

Bye CakePHP, bye dAuth... Hello Drupal!

I'm afraid the time has come to say goodbye to CakePHP, and to the projects I've been working on for it.
I still like Cake ... In fact, the further development of 1.2 goes the more I like it (well, generally spoken that is ... because there are some minor things I don't like but that's not important now). The truth of the matter is I like to develop, I like the php language and I enjoy working with Cake.
But .. all the sites I currently work on are all community sites or blogs, and although some of them have some specific requirements, in the end it's all very generic and a full blown content management system like Drupal proves much more useful and feature full then developing my own application in a web application framework such as Cake. (even if that's becoming easier and easier to do)

::Read more

Sun, 04 Mar 2007

Hello world!

Finally, my own website...
I already wanted to get this up for a long time. My initial idea was writing (and styling) it all from scratch using the marvelous CakePHP framework along with an authentication system i wrote, dAuth.
However, due to my lack of time I decided to use the excellent drupal platform, of which I'm quite sure will get the job done equally well, while drastically liberating my time, so I can invest it in other projects :-)
Dries Buytaert's talk on fosdem this year really helped on making that decision ;-)

So, what will this site be about?

  • me
  • my interests
    • Free & Opensource software, and the thoughts/ideals behind it
    • PHP scripting/programming (I like C(++), bash and j2se too but I'm not as good at it as I am at php)
    • Audio recording/mixing/production
    • Drumming, one of my greatest hobbies
    • Music, bands, movies,... I like
    • productivity (TDD, automation scripts, shell/DE tweaks, ...)
    • ethics and philosophy, these aspects are really important in my life
    • Jeugdhuis SjaTOo, our local youth club

Now let's get started ;-)

Fri, 12 Feb 2010

facebook usrbincrash php implementation

Implementation for Facebook usr bin crash puzzle. (how/why)

I haven't touched the code for a few months, but better to put it online then to let it rot.
http://github.com/Dieterbe/facebookpuzzles/

2 branches:

  • master: basically what I submitted to FB, and what just works
  • withpruning: an attempt for futher optimalisation (it only improves the runtime in some cases) but I didn't finish that version and there's a bug in it somewhere

In the repo you'll also find various test input files supplied by the community on the forums and a script to benchmark the implementation on all inputfiles.

Sat, 24 May 2008

Announcing the Netlog Developer Pages

At work, we've setup the Netlog Developer Pages

It is the place where you can/will find all information around our OpenSocial implementation, our own API, skin development, sample code and so on.
We've also launched a group where you can communicate with fellow developers and Netlog employees.
The page also features a blog where you can follow what is going on in the Netlog Tech team.

PS: We've also updated our jobs page

Sat, 07 Apr 2007

Figuring out CakePHP's new AuthComponent

In the Cake community, there has always been much interest in authentication/authorization systems. The issue of authentication has been addressed in several add-ons provided by the community, such as DAuth (written by me), OthAuth (written by Crazylegs) and many others.

However, one of the additions to the 1.2 branch which is currently in active development , is a built-in auth module. A module that isn't finished yet but it sure is worth it looking at. (In fact I'm thinking about making a new dAuth version built on cake's own auth system.). As most bakers know, there is very little information about the 1.2 branch in general, and the auth component in specific. So what I will try to do, is delve in the code, mess with it, and explain my findings in this post. For this first post it will be more trying to decipher the source code, messing with it will probably for a little later on.

::Read more

Wed, 28 Nov 2007

Hacking into my router by brute-forcing http authentication

I forgot the username and password to access the web panel of my router.
Luckily I knew some possible usernames and some patterns that I could have used to construct my password, so I just had to try all the combinations... Too much work to do manually but easily done when scripted.

Here is the php script that I came up with. (obviously stripped of my personal stuff). It got my account in less then a second :)

::Read more

Thu, 15 Mar 2007

Fosdem 2007 review

Every year, during a special weekend in February, the University Libre of Brussels suddenly becomes a little more geeky.
It's that time of the year when many European (and some inter-continental) colleagues join us at
Fosdem: the Free and Open source Software Developers' European Meeting (more info here).



::Read more

Sun, 01 Jul 2007

PhpDeliciousClient, a php cli client to administer del.icio.us accounts

PhpDeliciousClient is a console based client for doing maintenance on Del.icio.us accounts.
I wrote it because - to my knowledge - there currently is no good program (including the personalized del.icio.us web page itself) that lets you make changes to your del.icio.us data in a powerful, productive manner. (with data I primarily mean tags. Posts and bundles are considered less important).

You probably are familiar with the fact that a Delicious account (or any tag based meta data organizing system, for that matter) can soon become bloated: It gets filled with way too many tags. Among those tags several of them mean the same (fun, funny, humor, ...) or include the other (humor, jokes, ...) You can group them in bundles but even then you need to add all the tags to a post if you want it to appear in the results for that tag. Not very convenient. Also, if you have your del.icio.us bookmarks available in Firefox, you'd have a menu with several hundreds of entries (one for each tag), each menu containing usually just a few (or worse: just one) entry.

When I got in this situation I tried to fix it, but it was a hell of a task to do this on the Delicious webpage itself, and I although I found some other tools they were far to basic, outdated, dependent on other stuff or just not meant for this kind of task, so I decided to write my own.

The result is a php command line program called PhpDeliciousClient (as you can see, I added it to the menu on the left too), which uses the PhpDelicious library to access the Del.icio.us api.

The primary focus of the program is to help you to bring your tags in balance, in an as efficient way as possible. Other stuff, which can be done just fine on the delicious page (editing single posts, changing your password, ...) is not implemented.

It's a bit hacky, I don't give any guarantees but I can tell I used it to edit my own Del.icio.us page, going from about 400 tags to about 80 without any problems.

That said, head over to the PhpDeliciousClient project page for some more information, and to download it ;-)