Skip to content

Instantly share code, notes, and snippets.

View vladimir-ivanov's full-sized avatar

vladimir ivanov vladimir-ivanov

View GitHub Profile
@vladimir-ivanov
vladimir-ivanov / Blur.js
Created May 16, 2013 16:18
ngBlur - to work with function passed as argument only
var BlurDirective = function () {
return {
restrict: 'A',
link: function (scope, elm, attrs) {
elm.bind('blur', function () {
console.log(attrs);
var blurArgs = attrs.blur,
functionName = blurArgs.match(/([^\(]*)/),
@vladimir-ivanov
vladimir-ivanov / gist:4066520
Created November 13, 2012 15:54
JSCover example
/*
* STEPS
* 1. Download JSCover from https://github.com/tntim96/JSCover/downloads
* 2. Download htmlunit bin rather than src version from http://sourceforge.net/projects/htmlunit/files/htmlunit/
*/
// start JSCover-all.jar
java -jar target/dist/JSCover-all.jar -ws --document-root=/www/dsa/project/web --no-instrument=js/test --no-instrument=js/lib/vendor --report-dir=target
/**
* Example to use in the brows