1. Apache2

    September 2, 2010 by jerome

    3 essentials:

    /etc/init.d/apache2 start
    /etc/init.d/apache2 stop
    /etc/init.d/apache2 restart

    * be root, first :)


  2. removing cache of css files

    August 30, 2010 by jerome

    	<style type="text/css" media="screen">
    		@import url( <?php bloginfo('stylesheet_url'); ?>?rnd=<?php echo rand(0, 1000); ?> );
    	</style>
    

    silly – but useful at hand from time to time; hopefully it should help!


  3. WordPress: category parents

    August 22, 2010 by jerome

    * While working on a new project with Florian – Metrokit – we needed parents categories to be displayed within single.php
    after reading a few post on the subject, here is the solution we came up with, largely inspired by this article.

    
    foreach((get_the_category()) as $category) { 
    
    	$category_name = $category->name;
    	$category_ID = get_cat_ID($category_name);
    	$parentCatList = get_category_parents($category_ID,false,',');
    	$parentCatListArray = split(",",$parentCatList);
    	foreach($parentCatListArray as $parent) {
    		$parent_cat_id = get_cat_ID($parent);
    		$parent_category_link = get_category_link($parent_cat_id);
    		echo "<a href='{$parent_category_link}'>{$parent}</a> ";
    	}
    	$topParentName = $parentCatListArray[0];
    	$sdacReplace = array(" " => "-", "(" => "", ")" => "");
    	$topParent = strtolower(strtr($topParentName,$sdacReplace));
    }
    

  4. pictogram, web & typography

    August 21, 2010 by jerome

    Picture 5.png

    * uber simple but neat! font-face (CSS3) is used to avoid the intensive use of images (even small icons) and instead would use fonts, pictograms and dingbats. Pay him a visit!


  5. zip – how useful!

    February 3, 2010 by jerome

    This might sound trivial to a lot of us – but i find it so useful so often… Maybe you have other practice for such use – just let me know!

    Zip let’s you archive a whole directory wiht many subdirectories and files inside in one convenient file. It’s usually done trough the OS UI by simply right clicking on a directory and selecting compress or archive this from the contextual menu.
    When you want to download an archive of a website or any files online it is sometimes a lot more effective and convenient to just use the same zip archive. Unfortunately FTP programms wont let you do any such thing – so you have to bypass – if you are the lucky user of a server with an SSH access nothing is simpler:

    connect to the server using the terminal:
    ssh username@myserver.com

    insert the password

    navigate to the top of the directory you want to archive

    type:
    zip -r archiveFileName directoryName

    * this will archive the content of directoryName into a zip file called archiveFileName; -r stands for recursive

    ** according to the number and size of the files in your archive, the compressing can take very long – i like to have it running on a second screen exactly like an activity monitoring device of the server life – sort of an electronic presence of the machine.

    *** you can then move the zip file around, transfert it to another ftp or use it locally – unzip command will let you un pack the archive and access the files.

    sangbleuarchiving.electronicpresence.png

    **** if you are using fuse – don’t think the conextual menu is the best solution: you would be using zip on your computer and would download each files to be compressed on your local machine, and doing the compression on the distant disk. Latency time for read and write access will be HUGE. Chances are your are going to kill a couple of processes on your own machine, at best this will take ages (like in days). Just use the ssh via the terminal and all the compression task will happen on the distant server, leaving your computer free of sluggish clogging.


  6. WordPress: thumbnail resized images look fadded

    December 19, 2009 by jerome

    * just came (again) across an issue spotted some times ago we didn’t solve at that time – if you don’t know what we are talking about you might like to read this post: On WordPress image resizing that explains visually the issue:

    When using the auto generated images from wordpress, they are completely desatured compared to the original uploaded images.

    The only way we found was to actually use images without any profile. You will have to edit your images in your favourites image editing software without any profile.
    Photoshop users: Edit > Assign Profile > Don’t Color Manage This Document > Ok

    Profiles are used to optimise image according to the medium they are displayed with.
    Wordpress use imagecopyresampled from the PHP GD Library to generate the thumbnails (thumb, medium, large). GD is a sort of library that extends PHP language and allow it to manipulate image data in a simple way; unfortunately GD does not support profiles and any profile submited within an image will not only be ignored but also discarded.

    ** i would happilly receive any recommendation for image editing alternative on OSX, eventually open source (dont tell me Gimp) and procedure to discard profiles…

    *** the Images look faded topic on WP forum being closed, we thought it might be helpful to someone else…


  7. Bits and pieces: Electronic Presence Logs (1)

    December 5, 2009 by jerome

    * the idea of this logging application is to gather in one single place all activities around a website and represent them so that it highlights positive and negative relationships: publishing of post/page, use of twitter, facebook, mailinglist, etc. in order to be able to monitor and analyse an electronic presence, the traffic influence online activities are having – what are the other aspects that could be monitored? Beside the AdminLog plugin being developped, a few notes and interesting thing found during researches:

    Realtime Monitoring seems to be essential – that’s one of the downside of using Google Analytics. At the same time, the realtime aspects might create a curtain in front of the bigger picture of a larger time scale for monitoring activities.

    Google Analytics has an API
    most certainly useful to gather more data beside the realtime echniques we are already using.
    http://code.google.com/apis/analytics/
    http://code.google.com/apis/analytics/docs/gdata/gdataLibraries.html

    Google Analytics released Intelligence; their new automatic alert system.
    the system automatically draw attention to unexpected events, based on re-occurences of values. If the bounce rate suddenly is sky rocketting, the system will notice the alteration in the pattern and trigger an alert. Their custom alerting system lets admins set custom alerts parameters; but i haven’t been succesful so far with it…

    Conversion rate
    conversion rate is the ratio of visitors who convert casual content views or website visits into desired actions based on subtle or direct requests (Wikipedia: Conversion Rate)
    Wat are the relevant actions? So far, for DMO i have been considering the following actions as being relevant:
    Add to cart, Checkout, Mailinglist subscription, Twitter follow

    The new facebook privacy system seems to introduce stats f consultation – ?

    Flickr has a nice but limited statistics tool; interesting to monitor and glue with the Google data on referrer to monitor the conversion from Flickr. API?
    http://www.flickr.com/services/api/flickr.activity.userPhotos.html


  8. Pods (wordpress)

    November 28, 2009 by jerome

    Pods is worth checking out; it helps turn wordpress into a full fledged CMS.

    hp-edit-pod.jpg

    Pods

    Pods is a CMS framework for WordPress. It’s a plugin that sits on top of WordPress, allowing you to add and display your own content types.
    These content types, or “pods”, are totally separate from Posts, Pages, or Custom Fields. The Pods plugin uses its own database structure for maximum efficiency, and for relationships among items.


  9. WordPress: HTTP error while uploading

    November 21, 2009 by jerome

    we recently had those weird errors – using the flash uploader or the html uploader didn’t improve the situation: the dreaded HTTP error kept on buging us until we realised our error: the wordpress install was protected by a password (apache’s .htaccess) and the solution was lying there as well: the following has to sit in .htaccess in the wp-admin folder fr the time the blog is protected by a password:

    
    AuthType Basic
    AuthName share
    Satisfy Any
    Order deny,allow
    Allow from all
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>
    
    

    * we didn’t monitor what would happen to this htaccess after an automated upgrade


  10. The Go Programming Language

    November 13, 2009 by jerome

    The Go Programming Language.

    * this is big; if you are into programming languages or at least keen on discovering new languages. This is the latest addition by Google rooted into Plan9 via Inferno. I am really keen on discovering more about it – even if just by curiosity and no particular projects. I think Plan 9 conception of computers as communication hub is brilliant and perfectly fit our no-yet-so current conception of the internet (read: electronci presence) – and thus any grand children of this very conception helps things happen/evolve a bit faster…

    ** give to Mike what “belongs” to him: Mike found out about the Plan 9 familly roots.