RSS Feed
2012/02/04

how to not cache the footer in magento

Max Girkens, 2011/10/04 05:10

With some advanced scheduled-post-voodoo i successfully managed to publish this post already yesterday with some completely unrelated queries and no text. this was not intended – please accept my apologies :P

Anyway: In the footer of my magento shop we might have a summary of the shopping cart,
which i simply put in the footer.phtml template file:
» read more

set up magento in multiple environments

Max Girkens, 2011/09/27 05:29

I just started digging in the shop software magento for a project and set up the following development environment.

In this scenario development is done on two local machines while products and pages beeing already edited on the “Live”-Web-Server.
Git is used for version control and deployment. Also FTP SSH. » read more

Tilt – 3D DOM visualization

Max Girkens, 2011/09/23 06:00

someone just +1′d this nice addon for firefox:
(thanks, conrad :)

Tilt Firefox 3d Dom Addon1-300x160 in

Tilt visualizes the DOM in 3D and is a lot faster than i expected.
» read more

install silverstripe with some modules from GIT

Max Girkens, 2011/09/11 12:53

This is a small shell script to set up silverstripe CMS
along with some modules i often use (as seen in ivo’s post)

The script has two parameters:
- the folder to clone the whole thing into
- the branch/tag to checkout afterwards

# install silverstripe + common modules from github
# usage sh install_silverstripe.sh <folder_name> <tag/branch>
# examples:
# sh install_silverstripe.sh some_folder tags/2.4.5
# sh install_silverstripe.sh some_folder master

» read more

install lame on debian lenny

Max Girkens, 2011/06/20 13:09

If you are going to install the mp3 en/decoder lame on debian lenny,
this is how i got it done:

choose your package: http://debian-multimedia.org/pool/main/l/lame/

wget http://debian-multimedia.org/pool/main/l/lame/lame_3.98.2-0.4_i386.deb
dpkg -i lame_3.98.2-0.4_i386.deb

yay!

jQuery .scrollToViewPort()

Max Girkens, 2011/06/11 15:53

yesterday i found this very useful jQuery-script on github:

https://gist.github.com/853841

jQuery.fn.scrollToViewPort = function(animTimeInterval) {
  animTimeInterval = (typeof animTimeInterval == "undefined")?"slow":animTimeInterval;
  return this.each(function(){
    $('html,body').animate({scrollTop: $(this).offset().top},animTimeInterval);
  });
}

it moves the users’ viewport to show the element that it has been called on.

I modified it somehow so that it will check now if the element is already in the viewport.
So we can avoid auto-scrolling in that case.
A offset Parameter has also been added in case we need some margin.

https://gist.github.com/1018842

jQuery.fn.scrollToViewPort = function(options) {
  var animTimeInterval = (typeof options.interval == "undefined")?"slow":animTimeInterval;
  return this.each(function(){
    var offSet = (typeof options.offset == "undefined")? $(this).offset().top : options.offset;
    if( $(this).offset().top <= $(window).scrollTop() || ( $(this).offset().top + $(this).height() ) >= ( $(window).scrollTop() + $(window).height() ) ){
      $('html,body').animate( { scrollTop: offSet }, animTimeInterval );
    }
  });
}

usage:

 $(this).scrollToViewPort( { offset : ( ( $(this).offset().top + my_custom_offset ) - $(window).height() ) } );

Image Placeholder Services

Max Girkens, 2011/04/01 10:51

cooler Service, wenn man mal neutrale Platzhalter Bilder braucht:
http://placehold.it/

und was ähnliches mit Flickr Fotos:
http://flickholdr.com/

reload CSS in Firefox 4.0

Max Girkens, 2011/03/23 11:09

Firefox 4 ist ja nun draussen:
http://www.mozilla-europe.org/de/

Die Addons Firebug und der JSON Viewer sind ja zum Glück auch schon kompatibel.
Mein anderes Lieblingsaddon, der CSS reloader leider noch nicht.

Coolerweise gibt es aber dieses Bookmarklet:
http://david.dojotoolkit.org/recss.html
dass genau das tut.
Supersache!

save as WWF, save a tree

Max Girkens, 2011/02/27 22:17

Dogmatix recommends:

.WWF – ein PDF Format, dass sich nicht ausdrucken lässt.
Der Umwelt zuliebe.
» read more

E-Mail Adresse validieren mit PHP5 filter_var

Max Girkens, 2011/02/24 16:42

…seit längerem mal ohne meine Freunde die Framework Validatoren unterwegs gewesen,
das dann gefunden und gefreut wie einfach sowas heutzutage ist.

filter_var( $email, FILTER_VALIDATE_EMAIL );