Skip to content

Instantly share code, notes, and snippets.

View janmisek's full-sized avatar

Jan Míšek janmisek

View GitHub Profile
@janmisek
janmisek / gist:0a730e44c43317609667
Created April 28, 2015 11:06
Clear indexed dbs in chrome
indexedDB.webkitGetDatabaseNames().onsuccess = function (dbs) {
dbs = dbs.target.result;
for (var i=0; i<dbs.length; i++) {
console.log('removing indexedDB', dbs[i]);
indexedDB.deleteDatabase(dbs[i]);
}
};
@janmisek
janmisek / gist:7f743a9360c89fbbc10f
Created April 20, 2015 07:52
Watch files and execute command upon change
pip install watchdog
watchmedo shell-command \
--patterns="*.rst" \
--ignore-pattern='_build/*' \
--recursive \
--command='make html'
@janmisek
janmisek / gist:14d5b473ddc1cfdd0ca7
Last active August 29, 2015 14:19
Broccoli filter to get output from spawned process

Package.json

{
  "name": "broccoli-aglio",
  "version": "0.1.0",
  "description": "Broccoli filter to get output from spawned process",
  "author": "Jan Misek <[email protected]> (https://github.com/janmisek)",
  "license": "MIT",
  "devDependencies": {
    "aglio": "^1.18.0",
@janmisek
janmisek / gist:068d36b46ff4fdd850cc
Last active August 29, 2015 14:19
Hook worker in ember-cli building process

Hello

It is already possible to hook workers scripts into ember-cli build process (including watching) even it is not straightforward.

Option 1: workers does not need to reuse routines from application

Its possible to include own building tree in Brocfile.js

var webpackify = require('broccoli-webpack');