If you have the burden to work on hta applications you might get into conflict with incompatibilities. So am I. I wanted to migrate a hta application from 2012 with bootsrap 2 to bootstrap 3. Bootstrap 3 doesn’t support IE 7 any more and also the fix with Respond.js doesn’t work in local files. So what now? I found node… Read more →
Tutorials
Revoke PGP key
Follow this tutorial if you want to revoke a pgp key. All you need for this is your private key and eventually the pass phrase to open it. At first you need to install pgp on your machine. I have installed GnuPG. Change to the install dir or add to PATH. cd C:\Program Files (x86)\GNU\GnuPG Next import your private key:… Read more →
Find broken shortcodes
If you recently changed your theme and used shortcodes from it or disabled plugins you maybe want to find all leftovers of them because they are not translated any more. You will find things like [shortcode attribute=”bla”] all over website. Obviously you don’t want to review each post on your website to find them manually. So there comes a little… Read more →
sort functions – access class member
If you want to sort a class member with the functions uasort, uksort, usort (the u stands for user-defined comparison function) you have to take care of some things. bool uksort ( array &$array , callable $key_compare_func ) The function takes as first parameter the array you want to sort as reference. Thereby no copy is made to the function… Read more →
WordPress change post_date for tests
If you want to create a post via the post factory in you tests you can do it like this: function test_getPostsInYear() { $post1_id = $this->factory->post->create( array( ‘post_date’ => date( ‘2010-04-08 13:46:43’ ) ) ); $post2_id = $this->factory->post->create( array( ‘post_date’ => date( ‘2014-04-08 13:46:43′ ) ) ); .. Make sure to pass a date! Unix timestamps or other formats won’t… Read more →
Mirror site via wget
If you want to mirror a website to another location you can easily use wget as follows: Read more →
koding.io wordpress phpunit environment
If you want to use koding.io as wordpress plugin developer with tests (executed by phpunit) you can follow this guide. This guide illustrates how the test environment is set up on koding.io. You should already familiar with wordpress & testing to understand the tutorial. Read more →
How to install Scrapy
This line installs all requirements for pip first. After that you can install pip. With pip you can install Scrapy. sudo apt-get install build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev python-dev python-libxml && sudo apt-get install python-pip && sudo pip install Scrapy This should avoid errors like: Downloading/unpacking lxml Running setup.py egg_info for package lxml /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: ‘bugtrack_url’ warnings.warn(msg)… Read more →
WordPress action or filter not called
If you are using the wordpress api to hook into actions or filters there are some pitfalls. But these pitfalls are not wordpress related but likely your faults. I wan’t to show how to NOT hook into wordpress. 1. add_action( “actionA”, array( __CLASS__, “processA”, 10, 3) ); Please check the array declaration. Stupid mistake, but it’s hard to locate the… Read more →
Problems Solved for Setting Up Jenkins
You must set the %JAVA_HOME% and Path environment variables for jenkins. Otherwise you should get errors like: $ “C:\Program Files (x86)\Android\sdk/tools/android.bat” list target Der Befehl “C:\Windows\system32\java.exe” ist entweder falsch geschrieben oder konnte nicht gefunden werden. Ungültiger Pfad Das System kann den angegebenen Pfad nicht finden. To do so follow this steps: Create a %JAVA_HOME% var with path to the Java… Read more →