Blog /
Dev
43 posts
2017
- Try to recover from a failed Raspberry PI SD card So my raspberry pi would no longer start. After some investigation I could only conclude that the SD card became corrupted. It would initially start but it would hang somewhere halfway. I would see…
2012
- Online tool: CSV to JSON A nifty client-side (javascript) tool to convert a csv dataset to json http://www.cparker15.com/code/utilities/csv-to-json/ And the source code: https://github.com/cparker15/csv-to-json I placed a…
- OpenVPN error: Warning: route gateway is not reachable on any active network adapters Windows XP: disabling NetBIOS Open your Control Panel Open the Network Connections window Right-click the TAP-Win32 adapter and select Properties Select Internet Protocol (TCP/IP) and click…
- Utility to upgrade a Joomla 1.5 template to 1.7 I've made a utility to upgrade a Joomla 1.5 template to make it compatible with 1.7. Try it out here (no longer online) . I've only tried it out on one template, so be very carfull when you try it:…
2011
- Regex: match 4 or more consecutive letters or numbers ([a-z-0-9])\1{3,} Sites to test: http://www.regexplanet.com/simple/ http://www.rubular.com/ http://www.cyber-reality.com/regexy.html http://www.spaweditor.com/scripts/regex/index.php
- Extract winmail.dat files in linux Source: http://www.faqforge.com/linux/how-to-open-winmail-dat-files-on-ubuntu-or-debian-linux/ The winmail.dat file is a container file format used by Microsoft Outlook to send attachments in…
- Repair corrupted zipfiles in linux Source: http://techie-buzz.com/foss/fix-corrupted-zip-files-in-linux-quick-tip.html You can easily repair “repairable” zip files downloaded on Linux by issuing the following command; zip –F…
- Funny source code comments http://cobaia.net/2010/09/top-funny-source-code-comments/ and the original http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered And, on a…
- Argument list too long Source:http://www.linuxjournal.com/article/6060?page=0,0 Four approaches to getting around argument length limitations on the command line. At some point during your career as a Linux user, you may…
- Update of Allow Categories Wordpress plugin I'm using the allow categories wordpress plugin, but since the "recent" upgrades (I tend to postpone updates) some problems occured: I could not add new posts (permission denied) nor see unattached…
- Autostart OpenOffice powerpoint presentation (windows) Source: http://extensions.services.openoffice.org/en/project/ImpressRunner#comment-282 We installed openoffice on our mothers' machine. Everything works more or less as the MS Office suite. But it…
- More linux snippets Need to remove all those ^M characters from a DOS file? Try tr -d \\r < dosfile > newfile Need to find which process is taking up a certain port? sudo fuser -n tcp 8080 get details on a certain…
- A successful Git branching model source: http://nvie.com/posts/a-successful-git-branching-model/ Copied here in case nvie.com goes down. It focuses around Git as the tool for the versioning of all of our source code. Why git? For a…
- Mysql: determine cheaters emails At the office we often develop apps for campaign contests. Obviously we often have to deal with cheaters: users who register using either disposable email addresses or catch-all domains. This sql…
2010
- More MySQL queries Calculate table size select table_name, data_length, data_length/1024/1024 as sizeinmb from information_schema. tables where table_schema='yourschemaname' order by sizeinmb desc; Calculate ranking…
- My first joomla plugin - Facebook like My brother is setting up a number of Joomla sites. For one of them he wanted to have a facebook like button. The ones he found only were modules, so for the entire site, not for a specific article.…
- Subversion - Command line samples Some of the svn commands I use from time to time. Find the revision number when a branch was created svn log --verbose --stop-on-copy urltosvnbranch Merge latest changes from the runk to your branch…
- Unix - Copy files For one project we wanted to duplicate the i18n files of a codeigniter application to a new locale. This is how my colleague did it. # Copy all dirs named 'fr_FR' to a 'fr_LU' dir in the same parent…
- Unix - wordcount source: http://www.unix.com/nl/unix-dummies-questions-answers/108614-word-count.html and…
- MS SQL Server - Log slow queries source: http://blog.brianhartsock.com/2008/12/16/quick-and-dirty-sql-server-slow-query-log/ This query will list the top 20 most read intensive queries. What is great is it is based on total reads,…
2009
- Ubuntu - rename multiple imgs I wanted to rename a bunch of pictures I had converted to black-n-white: rename -n 's/\.JPG$/_bw\.JPG/' *.JPG The -n option doesn't actually rename, it only shows what files would have been renamed…
- Linux - Add an environment variable to your profile Just something for myself. I had to install maven at the office and had to search again how to add the environment variables to my profile and have them effective immediately, without logging off/on…
- More useful Linux commands How to get some hardware info about your machine? Execute this one: sudo lshw -html > info.htm Source: colleague MV From my colleague BV I got the following interesting site:…
- Sendmail painfully slow on Ubuntu At the office I'm running ubuntu 8.04 (Hardy Heron). My machine always took quite some time to boot, mainly due to sendmail trying to do stuff I couldn't care less about. I just get my morning coffee…
- Xampp painfully slow I'm working from my home for a couple of days a week. Right now I'm doing a php project using Codeigniter. It's my preferred php framework. I have been using CakePHP in the past. That one is great…
- Generate a password in bash shell /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c8 source: http://funinc.org/w/20080623/generate-a-random-password-in-bash.moo/
- Configure MySQL source: http://www.devside.net/guides/windows/mysql Startup MySQL can be installed as a Service (automatic or manual start-up) or started as a standalone console application. The MySQL server can be…
- WinMySQLadmin - Access Violation I installed xampp on my windows machine last week. When I booted the next time, I got an error popup every few seconds. The error was caused by WinMySQLadmin and was access violation at address…
- Find something that isn't there in Linux and other nifty snippets As I switch often between Linux and Windows, I tend to forget the most basic stuff. A little brain and a lot of garbage in it doesn't help obviously. One of the things I use quite often (and have to…
- My Facebook Connect experience For one of our customers, we needed to integrate with Facebook. For signing in, for publishing feeds, for adding profile boxes, the works. Facebook has a lot of documentation available, so this would…
2008
- Batch resize images on Ubuntu Found this thread on how to batch resize images: http://ubuntuforums.org/showthread.php?t=170862 For horizontal conversion: for i in `ls`; do convert -resize 1600 $i hresized_$i; done For vertical…
- XAMPP control panel error on Ubuntu When trying to lauch the xamp control panel today, I got the following error: File "xampp-control-panel.py", line 21, in import gtk File "/var/lib/python-support/python2.5/gtk-2.0/gtk/__init__.py",…
- Delete files from your iTunes library (javascript) I found out yesterday that, when you delete files from your iTunes library, they are not deleted physically from your hard drive. This is the case on Windows machines when you define a separate…
- Nifty blog sites on CakePHP I've been diving into the wonderful world of CakePHP. At the office I'm starting a new internal project and I decided to do it in PHP. It is actually the first project ever I do in PHP. Since I'm…
- A unique list in Java A quick way to retrieve a unique list of items from an ArrayList Source: http://www.theeggeadventure.com/wikimedia/index.php/Java_Unique_List The Java collections bundled with the JDK do not provide…
- Classic ASP - UTF-8 to Cookies I spend quite some time today trying to figure out how to get UTF-8 encoded text into a cookie. It always ended up as a bunch of questionmarks. I even tried urlencoding/urldecoding the values but…
- Text To Image in Coldfusion 8 I just had a quick look today to find out how hard it is to write a "text to image" in Coldfusion 8. Turns out to be very easy. As is often the case in Coldfusion. If I left everything default, I…
- ASP Encode/Decode Functions Source: http://www.aspnut.com/reference/encoding.asp Methods for encoding and deconding text in various formats. URL Encode URL Decode HTML Encode HTML Decode Server.URLEncode Used for encoding data…
- MySQL - Select things that happened yesterday SELECT * FROM events WHERE updatedate = DATE_ADD(CURDATE(), INTERVAL -1 DAY) ;
- MySQL- Prevent duplicate key constraint violations Today, I found 3 different ways in MySQL to do an insert in a table without having to check if the key exists. This is mainly used for relationships where the application doesn't care if they…
- Finding the average date in MySQL Today I had to find the average of some dates in MySQL. Took me some googling, but finally found a "bug" report here . Conclusion: use something like SELECT…
- Coldfusion Soap using CFHTTP We just finished debugging a CF app that uses CFHTTP to communicate with a SOAP service. Finding bits and pieces of debugging tips accross the net we managed to track down the issue. The problem: It…
- Simplify Unit Testing for Spring Web Components Utilize Spring mock objects and Spring's extensions to the JUnit framework to simplify unit testing for Spring Web components. by Edmon Begoli There is nothing more reassuring for the software…