bash - dealing with backtics ” ` ” in mysql statement

problem :

using backticks in bash for mysql statements. e.g. :

mysql -u username -h host -e “GRANT SELECT, LOCK TABLES ON `somedatabase`.* TO ’someuser’@’somehost’;” -p<password with no space after parameter>

would get an error :

./scriptname: line 5: somedatabase: command not found

solution :

escape (\) the backticks ” ` ” surround “somedatabase”

mysql -u username -h host -e “GRANT SELECT, LOCK TABLES ON \`somedatabase\`.* TO ’someuser’@’somehost’;” -p<password with no space after parameter>

vim - error when starting

problem :

For some reason, starting up vim pops up an error at the bottom :

E575: viminfo: Illegal starting char in line: d^\^F
Press ENTER or type command to continue

solution :

delete the contents in ~/.viminfo

Voila !!!

Firefox 3 - “force” your add on compatible with it

  • On the url bar, type “about:config”
  • Right click on any of the empty space, click new –> boolean
  • In the box, preference name –> extensions.checkCompatibility
  • specified the value –> false

restart firefox and Voila !!!

FreeBSD - portupgrade rrdtool_1.2.26

Problem :

grep: /usr/X11R6/lib/libfontconfig.la: No such file or directory
sed: /usr/X11R6/lib/libfontconfig.la: No such file or directory
gnome-libtool: link: `/usr/X11R6/lib/libfontconfig.la’ is not a valid libtool archive
gmake[4]: *** [libpangoxft-1.0.la] Error 1
gmake[4]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.20.5/pango’
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.20.5/pango’
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.20.5/pango’
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.20.5′
gmake: *** [all] Error 2
*** Error code 2

Stop in /usr/ports/x11-toolkits/pango.
*** Error code 1

Stop in /usr/ports/databases/rrdtool.
*** Error code 1

Stop in /usr/ports/databases/rrdtool.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.28338.0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=rrdtool-1.2.26 UPGRADE_PORT_VER=1.2.26 make
** Fix the problem and try again.

solution :

After satisfying the dependencies (cairo & pango), do “ln /usr/local/lib/libfontconfig.la /usr/X11R6/lib/libfontconfig.la”

mount hfsplus (mac os file system) under Debian linux

Have an external hard disk with hfsplus or hfs+ partition on it? This is how you can mount it under linux (specifically, Debian) :

in os x :

  • disable journaling in the partition/external hdd in disk utility or use run the command “diskutil disableJournal /dev/disk1s1″ in terminal.

in linux :

  • apt-get install hfs*
  • mount -t hfsplus -o rw /dev/sdb1 /mnt/extdisk

Voila !!!

Page 2 of 42«12345»...Last »