Sander van Dragt's Notes

Login
  • Link: Stop paying your jQuery tax

    Sander February 17, 2012 at 11:07 am

    Speed up your jQuery powered site by moving scripts to the footer.

    Turns out that pushing jQuery to the footer is quite easy for the common case. If all we want is a nice $.ready function that we have accessible everywhere we can explicitly define it without jQuery. Then we can pass the functions we capture to jQuery later on after it loads.

    The big lesson learned is that we could avoided this whole problem if we started off with my proposed helper.

    via Stop paying your jQuery tax.

    #development

    #eeeeee

  • What Happens When You Swear At Your Users

    Sander February 7, 2012 at 10:04 am

    A valuable lesson for anyone running a website:

    After working out a few technical kinks and several botched emails, thanks to missing line breaks, we sent out a final test email to ourselves. Unfortunately, it went out to every user

    fetchworthy notes • What Happens When You Swear At Your Users.

    #web

    #626566 #ffffff

  • Hide elements that will be shown by jQuery later

    Sander January 30, 2012 at 10:51 am

    I stumbled upon this gem by Jerph on Stackoverflow:

    Right after the body tag, put a script tag with this javascript:

    jQuery('body').addClass('js');

    This gives you a style hook for any elements that will look different in some way when Javascript enabled, and it happens immediately.

    via css - Hide jQuery Accordion while loading - Stack Overflow.

    #development

    #ffffff #eeeeee #800000 #704022

  • Preprocessing CCK field output

    Sander December 7, 2011 at 2:10 pm

    So I spent a totally unproductive morning figuring out how to override a single field's output in Drupal without rewriting my complete template code for the content type - I want to keep using the $content variable. After many a fruitless attempt luckily Grag Harvey has the answer:

    Actually, control over CCK fields can be gained using CCK's own templates.

    Consider the situation where your field is called field_test.

    Copy content-field.tpl.php to your theme directory and copy it again for the field whose mark-up you wish to alter, naming it content-field-field_test.tpl.php in this case.

    Then change the mark-up in the file and it will alter the output of that specific CCK field.

    No need to touch node.tpl.php!

    Adapted via greg.harvey's answer at node.tpl.php | Drupal API.

    #drupal

    #comment

  • Project Cars

    Sander November 25, 2011 at 2:35 pm

    Sign up to WMD, the somewhat unfortunate acronym chosen for Slightly Mad's World of Mass Development platform, and you're granted access to regularly released builds of the game, which you're then free to pick apart in the official forums. That feedback then gets absorbed by Slightly Mad Studios, a simple loop that means that, when the game is eventually released, it'll be as much a product of the community as it is of the studio.

    via Project Cars Preview • Eurogamer.net.

    Looks like an interesting development strategy, made famous by Minecraft.

    #games

    #333333 #ffffff #0069ff

  • Asynchronous UIs - the future of web user interfaces

    Sander November 22, 2011 at 4:10 pm

    Discovered this javascript MVC framework SpineJS. The ToDo app is extremely impressive. Try and manipulate items as quickly as possible. Tthen close and reopen the browser. Nice.

    via Asynchronous UIs - the future of web user interfaces.

    #development

  • The price of a messy codebase: No LaTeX for the iPad

    Sander November 22, 2011 at 12:34 pm

    The price of a messy codebase: No LaTeX for the iPad - Valletta Ventures.

    The first step in compiling WEB code is to run TANGLE to produce unhelpful Pascal source files. Thoughtfully the TeX build system includes a translator to produce compilable C files. Although WEB was hugely influential as the progenitor of modern source code documentation it is now obsolete, and modern extensions to TeX have been written in C. This is compiled alongside the translated WEB code. It is not hard to imagine the effect this has on the readability of the codebase.

    Why programming is not yet as advanced as nature in evolution.

    #ios

  • Combining multiple Subversion repositories

    Sander November 10, 2011 at 3:30 pm

    This post describes a step by step guide on how to combine multiple Subversion repositories whilst keeping individual history (and commit messages).

    Dumping

    Exporting from pagefeedbacktool repository the /trunk/public folder and integrating that into the services repository under /trunk/public/pagefeedback:

    Dump the repository including only /trunk/public as follows:

    E:\\Repositories\\pagefeedbacktool>svnadmin dump .| svndumpfilter include --drop-empty-revs --renumber-revs trunk/public > ..\\services\\filtered.dump
    

    Loading

    However as pathnames are stored as part of the dump (and replacing the path with a texteditor corrupts the dump), we have to include the full path under a different parent directory:

    In VisualSVN create a /trunk/public/pagefeedback/trunk/public folder structure (try without the final public if import fails) then load the dump as follows:

    E:\\Repositories\\services>svnadmin load . --parent-dir "trunk/public/pagefeedback" < filtered.dump
    

    The dump is successful but at the wrong path:

    currently: /trunk/public/pagefeedback/trunk/public should be: /trunk/public/pagefeedback/

    Post-correction

    Open two Windows Explorer windows with both paths side by side, select all the files that should be moved, then RIGHT click drag them to the destination folder and choose SVN Move versioned files here...

    Commit from the repository root.

    It is now safe to remove the trunk/public folders under /trunk/public/pagefeedback/

    Commit again.

    #development

  • Useful Coding Tools and JavaScript Libraries For Web Developers

    Sander October 31, 2011 at 2:12 pm

    Here are some of the most useful coding and workflow tools released recently.

    via Useful Coding Tools and JavaScript Libraries For Web Developers

    #development

  • Modified Files - Windows 7 Productivity Tip

    Sander October 5, 2011 at 10:44 am

    To quickly access the files you've been working on today, create a new Favorites item for these files.

    [

    ](http://vandragt.com/wp-content/uploads/sites/7/2011/10/modtoday.png)To do this, open Windows Explorer and select your Libraries link on the left. Then in the search box, enter modified:today and click the Save Search toolbar button.

    Enter a name, such as Libraries Today, and press enter. You will now see the new item appear in your Favorites menu.

    You can select this item whenever you need to access recently worked on files.

    #windows

« Newer 1 2 … 74 … 82 83 Older »
  • #Tech
  • #TIL
  • RSS
  • JSON
Powered by Lamb.