grunt-codekit now supports js concatenation

9. juni 2014

A final missing piece was added to the plugin for Grunt I made a few months ago: javascript concatenation using CodeKit’s prepend and append directives. Now you might think that this is a useless feature, as we have had the grunt-contrib-concat plugin for ages, but to use that you would have to change your existing project for it to work. Adding support for handling inline build comments like these

// @codekit-prepend "some-file.js"
// @codekit-append "some-other-file.js"

makes it possible to keep using CodeKit&tm; and Grunt at the same time. That means non-Mac developers can still contribute to you project, you don't have to change any code, and you can keep the nitty-gritty of various builds in Grunt, and just use CodeKit like you normally do. Which was kinda the point for me, since CodeKit < 2 sucked at sharing config between team members (build file changed all the time). Les resten av dette innlegget »


Running Karma tests on BrowserStack

27. mai 2014

Browserstack is a great setup and Karma is a great test runner for javascript, so the two should be a pretty good fit right? In practice it took me quite a lot of time to get the settings right, including discussions on the karma users group and some help from the good folks at BrowserStack. What follows are some brief notes on how I set this up to run with Grunt and on the Jenkins build server. Les resten av dette innlegget »


Grunt plugin for the Kit language

25. februar 2014

Just made a Grunt plugin to compile files written using the Kit templating language used in CodeKit. An NPM package for download is available.


Using the Node Package Manager (npm) with Cygwin

12. februar 2014

Case is that if you have tried installing NodeJS and tried running it under Cygwin you have gotten something like this:


/cygdrive/c/Dev/nodejs/npm: line 2: $'r': command not found
/cygdrive/c/Dev/nodejs/npm: line 4: $'r': command not found
/cygdrive/c/Dev/nodejs/npm: line 5: syntax error near unexpected token `$'inr''
'cygdrive/c/Dev/nodejs/npm: line 5: `case `uname` in

This is due to the Cygwin environment expecting Unix line feeds, whereas Windows (and the Node version compiled for it) are expecting Windows style line feeds. The trick here to using Node is simply to create an alias for it, making it run using the normal CMD shell. The fix is as easy as putthing this in your $HOME/.bashrc file:
alias npm="cmd /c npm"

Now you can npm install all you want!


Lage gyldige bankkontonummer

7. januar 2014

Når man utvikler en løsning som krever gyldige inputverdier for f.eks. bankkontonummer er det ofte et problem at man må ha testverdier som passerer en gyldighetssjekk. Les resten av dette innlegget »


Dealing with Quotas in WebSQL on iPhone

6. august 2013

This post details various scenarios related to the user being prompted for more storage by the browser. You as a developer must handle these to avoid data loss. Some solutions are presented.

In this post I specify Safari, but that is only because I have tested this solely on that platform. It probably applies to most mobile webkit browsers. Les resten av dette innlegget »


Non-interactive remote distribution upgrades of Ubuntu

6. juni 2013

This is mostly a note to myself on how to remotely upgrade a ubuntu server using ssh. Also available on AskUbuntu.
Les resten av dette innlegget »


Følg med

Få nye innlegg levert til din innboks.

Bli med 724 andre følgere