(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
macro async { | |
case :{ $rest } => { | |
$rest | |
} | |
case :{ $head $rest ... } => { | |
$head | |
async: { $rest ... } | |
} | |
case :{ var $x:ident = await($yield:ident, $y ...); $rest ... } => { | |
(function($yield) { |
type ApacheLogRecord struct { | |
http.ResponseWriter | |
ip string | |
time time.Time | |
method, uri, protocol string | |
status int | |
responseBytes int64 | |
elapsedTime time.Duration | |
} |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
#include <stdio.h> | |
#include <emscripten/emscripten.h> | |
int EMSCRIPTEN_KEEPALIVE c_func_calling_from_js() { | |
printf("This is a c function calling from js!"); | |
return 0; | |
} |
function exceptionalException(message) { | |
'use strict'; | |
if (exceptionalException.emailErrors !== false) { | |
exceptionalException.emailErrors = confirm('We had an error reporting an error! Please email us so we can fix it?'); | |
} | |
} | |
//test | |
//exceptionalException('try 1!'); | |
//exceptionalException('try 2!'); |
// From https://github.com/kr/s3/tree/master/s3cp | |
// Added public read for uploaded files | |
// Command s3cp copies a file to or from Amazon S3. | |
// | |
// Usage: | |
// | |
// s3cp file url | |
// s3cp url file | |
// | |
// The file does not need to be seekable or stat-able. You can use s3cp to |
This may be a dumb solution, you'd better use $rootScope.$on(event, handler)
and $rootScope.$emit(event, args…)
and not use a third-party service.
My solution will bring you:
off()
if you really want to clean up your event handlers// require modules | |
var express = require('express'), | |
i18n = require('i18n'), | |
hbs = require('hbs'), | |
app = module.exports = express(); | |
i18n.configure({ | |
locales: ['en', 'fr'], | |
cookie: 'locale', | |
directory: "" + __dirname + "/locales" |
var empty_list = function(selector) { | |
return selector(undefined, undefined, true); | |
}; | |
var prepend = function(el, list) { | |
return function(selector) { | |
return selector(el, list, false); | |
}; | |
}; | |
var head = function(list) { |
var urls = [ | |
/* Wildcard CORS enabled - Works in PhantomJS 1.9.0 */ | |
'http://updates.html5rocks.com', | |
/* CORS disabled - Fails in PhantomJS 1.9.0 (and every other version) */ | |
'http://www.google.com', | |
/* Hack workaround? */ | |
/* | |
function(httpGet, callback) { | |
phantom.page.settings = (phantom.page.settings || {}); | |
phantom.page.settings.webSecurityEnabled = false; |