Skip to content

Instantly share code, notes, and snippets.

stickel / webpack.config.js
Created Jul 30, 2015
webpack/hot/dev-server and webpack working in a node angular app
View webpack.config.js
module.exports = {
entry: {
app: ['webpack/hot/dev-server', './app/app'], // => webpack-dev-server will work but webpack build won't
app: ['./app/app', 'webpack/hot/dev-server'], // => both webpack-dev-server AND webpack build will work
vendor: ['./app/vendor'],
components: ['./app/components/home']
stickel / angular-highlight.js
Created Jul 25, 2015
Getting angular-highlightjs working with webpack
View angular-highlight.js
(function (root, factory) {
if (typeof define === "function" && define.amd) {
// define(["angular", "hljs"], factory);
module.exports = factory(require("angular"), require("highlight.js"));
} else if (typeof module === "object" && module.exports) {
module.exports = factory(require("angular"), require("highlight.js"));
} else {
root.returnExports = factory(root.angular, root.hljs);
}(this, function (angular, hljs) {
stickel / gist:ace2e7fbe4e959f1007b
Created Jul 17, 2015
Jasmine: command not found
View gist:ace2e7fbe4e959f1007b
When installing `Jasmine` to run unit tests for an app you may run into the error `command not found` when calling `jasmine` from your project directory. To correct the error, install `Jasmine` globally (`npm install -g jasmine`) and the tests will run properly.
View gist:950c3f96ce34f7d8e2d3
Verifying that +stickel is my Bitcoin username. You can send me #bitcoin here:
stickel /
Last active Dec 15, 2016

Keybase proof

I hereby claim:

  • I am stickel on github.
  • I am stickel ( on keybase.
  • I have a public key whose fingerprint is 5020 AC34 60F8 C95B DCFF 1B15 9D7B 141A C449 7FF1

To claim this, I am signing this object:

stickel /
Created Aug 20, 2012 — forked from kara-ryli/date-ago.js
YUI module for calculating the time ago in words in English. Updated from the Prototype version and optimized for compressor.
YUI.add 'date-ago', (Y) ->
round = (value) ->
Math.round value
distanceOfTimeInWords = (from_time, to_time, include_s) ->
include_seconds = include_s or false
distance_in_minutes = round(Math.abs(to_time - from_time) / 60000)
distance_in_seconds = round(Math.abs(to_time - from_time) / 1000)
if distance_in_minutes < 2
if include_seconds
return "less than 5 seconds" if distance_in_seconds < 5