PHP webdeveloper and frontend developer



Vagrant up errors on install on Mac OS X

Category : Mac and Apple stuff, MySQL, PHP · No Comments · by Jan 23rd, 2014

Instead of MAMP I use Vagrant to set up my virtualhosts locally. That way you can emulate your webserver’s setup. To configure my Vagrant virtual machine I use PuPHPet. You need to have VirtualBox installed for this. After downloading the  PuPHPet configuration manifest you need to start up the virtual box. You do this by executing this command:

 Sometimes I…

Tabindex problems with Gravity forms in WordPress

Category : PHP, Wordpress · No Comments · by Sep 21st, 2013

Sometimes there are problems with the tabindex when you use the Gravity forms plugin in WordPress. You can fix this by adding this to your theme’s functions.php file

 This will set the start index from gravity forms to a higher number.

Change the amount of tags in tagcloud in WordPress

Category : PHP, Wordpress · No Comments · by Sep 21st, 2013

Add this piece of code to your theme’s function.php file.

 Set the number of the amount of tags you want to display on your page. Or you can just use the parameters for the wp_tag_cloud function.

   

Scroll to top of page from within Facebook app

When within a facebook app you sometimes want to scroll to the top of the page but outside of the iframe which contains your app. To do that you use the following code in javascript:

 This will only work when your canvas height is set to “Settable”. By default 800px. You can make in settable in the app Dashboard…

How to make a custom protected page in WordPress

Category : PHP, Wordpress · (1) Comment · by Jul 3rd, 2013

The default password form uses this message: “This post is password protected. To view it please enter your password below:”. You can use a custom text to display on a protected page by using a filter in WordPress. Add this code to your theme’s functions.php file:

 

Disable remember open files in Sublime text 2

Category : Web development · (2) Comments · by Jul 2nd, 2013
Disable remember open files in Sublime text 2

I recently did a find and replace over a whole project where every file had to be edited. There were about 2000 files that had to be edited. My Sublime text was crashing after a while.  Problem was that, after I closed Sublime text and reopened it, the 2000 files reopened automatically, which meant my Sublime Text kept crashing. You…

Get the depth of the current page in WordPress

Category : PHP, Wordpress · (1) Comment · by Jun 26th, 2013

If you want to get the level of the current page in WordPress you can use this 

 This function will echo the depth of the current page. If the depth returned is zero then you’re on a parent page.

jQuery HTML5 Twitter plugin for iPad using Localstorage

Category : Web development · (1) Comment · by Apr 13th, 2013
jQuery HTML5 Twitter plugin for iPad using Localstorage

I wrote a small jQuery plugin that gets it’s parameters from html 5 data attributes, so configuration is simple. It needs some cleanup but I’ll do that later You can download a zip of the files You can add 3 html5 data attributes to configure the plugin: data-twitter-username (required / used to set the username) data-twitter-tweet-count (optional / the amount…

Email harvesting of a domain using Linux Backtrack

Category : Mac and Apple stuff, Other · (1) Comment · by Apr 13th, 2013
Email harvesting of a domain using Linux Backtrack

A while ago I wanted to scan which email addresses can be found by spambots because that domain received a lot of spam. You can prevent users from capturing your email addresses from your website by encrypting the characters with html or javascript. This tools can encrypt your email address with javascript http://hivelogic.com/enkoder/ and this website http://www.wbwip.com/wbw/emailencoder.html does this through using character entities. To…

Jagged edges with CSS transform in Google Chrome (webkit)

Category : Web development · No Comments · by Mar 24th, 2013

When applying css transform on an element with a background image, the edges will appear jagged in Google Chrome. Also the image will appear pixelated. To fix this you can add this to your css selector: (this will only work for webkit browsers)

 I’ve added a small demo here The first image in the screenshot below doesn’t use the…


s