Category Archives: web

ubuntu – install all google fonts and use them in gimp

To install all google fonts in gimp on ubuntu, proceed as follows: download fonts from https://github.com/google/fonts/archive/master.zip create a folder “.fonts” in your home directory: mkdir ~/.fonts unzip content of downloaded file into newly created .fonts folder: cd ~/.fonts; unzip ~/Downloads/master.zip regenerate font cache: sudo fc-cache -fv restart gimp That’s it. All fonts should be avaialable sources https://github.com/google/fonts/ http://askubuntu.com/questions/3697/how-do-i-install-fonts https://wiki.ubuntu.com/Fonts https://www.google.com/fonts

Enable debugging in php

Installation Below are great tutorials on how to enable php debugging with vim and xdebug: https://mutelight.org/minimal-guide-to-debugging-php-with-xdebug-and-vim http://www.weberp.org/forum/archive/index.php/thread-9.html In a nutshell: sudo apt-get install vim php5-xdebug sudo vi /etc/php5/conf.d/xdebug.ini and append below content: xdebug.remote_enable=1 xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_autostart=1 Note: remove last line when in production, it’s pupose is to avoid having to run ?XDEBUG_SESSION_START=1 before debugging sudo apache2ctl restart download debugger.tar.gz from above link mkdir -p ~/.vim/plugin cd ~/.vim/plugin ; tar -xzf <path_to_debugger.tar.gz_file> Vim usage To learn how to use vim, open a shell and run ‘vimtutor’ to go through the tutorial! Vim debugging tips Once vim and xdebug are working together […]

wordpress: how to retrieve only categories child of a given one

Filtering the list of categories is pretty easy. To retrieve only categories child of a specific one, proceed as follow: log into wordpress go to ‘categories’ click on ‘edit’ for the category you consider as top one in the url, check the value of “tag_ID“, this is your category id (22 in this example) in your code, where you are making a call to “wp_list_categories()” simply add the “child_of” argument as follow: wp_list_categories(“child_of=$your_top_category_id”); in this example: wp_list_categories(‘child_id=22’); that’s it! Additional customization is possible since a bunch of configuration variables (including category nesting, number of posts in a category, …) are […]

wordpress: how to filter which posts are to be displayed

Filtering the list of posts to be displayed, for example to create ‘sub-homepages’ dedicated to a given topic (ie. filtering on a given category), is pretty easy in wordpress. Full instructions are available here: http://codex.wordpress.org/The_Loop To make a long story short: posts to be displayed are retrieved through “have_posts();” function call upon which you loop to retrieve posts one by one to create a filter, simply call “query_posts($my_filter_string);” before calling “have_posts();”, by now posts have been filtered and have_posts() will return only posts matching your criteria all the incredibly smart aspect of this approach lies in $my_filter_string. This is simply […]

Filter spam with keywords found in wordpress comments

If you have recurring spams with same links / keywords, good news is that a native wordpress solution exists! Steps go to Settings > Discussion insert your keywords, one per line, in either “comment moderation” or “comment blacklist” section save your changes That’s it! Bye bye dummy spams 🙂 source http://codex.wordpress.org/Combating_Comment_Spam

how to disable pingback notifications in wordpress?

I find pingback notifications to be pretty annoying. To disable them, simply log as admin and go to /Settings/Discussion and uncheck “Allow link notifications from other blogs (pingbacks and trackbacks.)” in “Default Article Settings” function sources http://wordpress.org/support/topic/372792

Opera: ld.so: object ‘libjvm.so’ from LD_PRELOAD cannot be preloaded: ignored

Each time I start Opera, I get these messages: ERROR: ld.so: object ‘libjvm.so’ from LD_PRELOAD cannot be preloaded: ignored. ERROR: ld.so: object ‘libawt.so’ from LD_PRELOAD cannot be preloaded: ignored. opera: X Shared memory extension is not available. ZPixmap not supported We will first deal with java msg, then with ZPixmap java ERROR: ld.so: object ‘libjvm.so’ from LD_PRELOAD cannot be preloaded: ignored. ERROR: ld.so: object ‘libawt.so’ from LD_PRELOAD cannot be preloaded: ignored. It means that java plugin was not found. make sure you have a java package installed (“apt-cache policy sun-java5-jre” otherwise install it “sudo apt-get install sun-java5-jre“). once java is […]

opera 9.5 browser: adobe reader not loading

With newly released Opera 9.5, I can no longer read pdf files, Opera loads the plugin but keep displaying a blank screen. In my shell, I have the following error messages: (acroread:4109): Gdk-WARNING **: GdkWindow 0x240014d unexpectedly destroyed (acroread:4109): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)’ in cast to `GtkObject’ It looks like a gtk problem to me. I did not find any matching entry on the web.

turn linksys wrt54g router into access point

I needed to turn my linksys wrt54g into access point, to act as a wireless bridge in order to extend my existing wifi network. I managed to do it thanks to dd-wrt incredible software. Be aware that by installing dd-wrt firmware, your warantly is no longer valid (in my case it was alreday long overdue), but honestly, it worth the risk given all the functionality it adds and fine tuning you can make. By the way, on linksys official website, they clearly say you cannot do this with their supported firmware => if you really want to do it, you […]

WordPress

If you want to change wordpress from one site to another, it’s not that easy. export data & structure from old sql db replace any old starting url (ex: “remydamour.com/wordpress”) with your new url (ex: “remydamour2.com/blog”) insert the content into mysql that’s it