Skip to content

Category Archives: Uncategorized

Jasmine unit tests throwing "Possibly unhandled rejection" with Angular 1.6?


Each $q.reject() throws an error if not being chained properly. First check that all calls have a .catch(). Second, if possible, isolate your error cases to an independent describe block. Example below using bardjs, but the idea should be clear enough. let stuffDataservice; const stuff = [{}]; beforeEach(function() { [...] stuffDataservice = { getStuff: function […]

ESLint disable rule for the whole file: /* eslint-disable */


While rules can be disabled for a line with // eslint-disable-line [rule-name] the whole file disabling needs block comments: /* eslint-disable [rule-name] */

Direct Link to HTML Gmail


Directo link to the basic low-fi HTML version of Gmail is

WordPress: Shortcodes in Widgets


Can I use a [shortcode] in a text widget? Sure! "Just add this to your functions.php file: add_filter('widget_text', 'do_shortcode'); This will ensure that the text content of widgets is parsed for shortcodes and those shortcodes are ran. Awesome." via Shortcodes in Widgets | Digging into WordPress.

Corrupt SD (or other memory) card? Recover photos


"PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from hard disks, CD-ROMs, and lost pictures (thus the Photo Recovery name) from digital camera memory. PhotoRec ignores the file system and goes after the underlying data, so it will still work even if your media's file system has […]