Tag: console - Articles:

AngularJS console debugging tips + pre-commit hooks

Just some handy accessors for the brower console : var myScope = $('#directive > select.or').scope() var $rootScope = $('body').scope() // if has the 'ng-app' attribute var myController = $('#directive > select.or').controller() var injector = $(document.body).injector() var myService = injector.get('myServiceName') And there are 3 handy pre-commit hooks : - repo: local hooks …

Read More

Fun with Javascript string obfuscation

Inspired by this tweeter post by Marcus Lagergren and the JS1K competition, here is a valid Javascript code snippet for you obfuscated code lovers: ー=!+[]+!+[]+!+[]+!+[],ߺ=ー+ー,ǀ=ߺ+ߺ,ꓹ=!+[]+[],ǃ=!+[]+!+[]+!+[],ᚐ=ꓹ[+[]],ꓹ=ᚐ+ꓹ[ǃ]+(![]+[])[ǃ]+ᚐ,ᚐ=/,/[ꓹ]+[],ꓹ=ǀ+ߺ+!+[]+!+[],ꓹ=ᚐ[ǃ]+ᚐ …

Read More