Jun 25, 2012 ·
1 minute read
magento
So, if you’ve ever had the situation where the only backup of a magento database has been done through phpmyadmin (hint: don’t do this, use the inbuilt backup tool or lightbackup magento extension), you need to set up some magic at the top and bottom of the dump files :- Add the following at the top :- SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION; SET NAMES utf8; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=‘NO_AUTO_VALUE_ON_ZERO’; SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0; and the following at the bottom : SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT; SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS; SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION; SET SQL_NOTES=@OLD_SQL_NOTES; This can also be done if you use some other backup systems (we’ve seen a table-per-file system too), in that instance, we created 00-head.sql and zz-foot.sql containing the above and create a single backup with ‘cat *.sql > all.sql’ before restoring.
Jun 21, 2012 ·
1 minute read
netbeans
If you have issues with netbeans and xdebug not connecting on recent distros, you might find that netbeans is listening on tcp6 and xdebug connecting on plain tcp. To check if this is the case, run the following command whilst netbeans is “waiting for connection” (change 9000 if you’ve set a different port) :- netstat -aln | grep 9000 if you get a line similar to the following (specifically tcp6 and not just tcp), it may well be that xdebug can’t connect over ipv6 :- tcp6 0 0 :::9000 :::* LISTEN One solution is to disable ipv6, which can be done by creating the file /etc/sysctl.d/10-disable-ipv6.conf with the following contents :- net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1 then run (as root or sudo) sysctl -p /etc/sysctl.d/10-disable-ipv6.conf and restart netbeans.
Read On →
Jun 18, 2012 ·
1 minute read
android
Just came across this interesting site: https://www.onx.ms/#recipesPage It seems to be a very nice system for really customising your Android experience.
Jun 12, 2012 ·
2 minute read
netbeans
If you are using a Java application on your nice new Linux Mint desktop and are wondering why its so damn ugly, this might be your solution. It looks like there is an issue with Java detecting your standard system style, fonts etc so it reverts to something pretty hideous. One easy solution to at least get it looking alright (and also fixing a bug with menus and maximisation) is to set your netbeans conf to the following.
Read On →
Jun 12, 2012 ·
1 minute read
linux
If you need to know what number a mouse button is (for example if you are configuring compiz) in Linux then you might like this little trick. xev | grep button Run the above in a terminal and it will display a white box. As you click on it, the button number will appear in your terminal. The pipe to grep is to filter out the large amount of noise from xev and only display the button number notifications.
Jun 6, 2012 ·
1 minute read
javascript
If you are struggling to figure out why a perfectly good jQuery plugin that works elsewhere is not loading into jQuery for a particular page, this may well be your solution. This behaviour will happen if something reloads jQuery elsewhere on your page, below the script tag that calls the plugin. If this happens, jQuery is effectively reloaded and has lost all the extensions you have made to it. The solution of course is to simply remove the extra jQuery loads.
Read On →