View svgfixer-clip-paths.js
// Original: https://gist.github.com/leonderijke/c5cf7c5b2e424c0061d2
(function(document, window) {
"use strict";
document.addEventListener("DOMContentLoaded", function() {
var baseUrl = window.location.href
.replace(window.location.hash, "");
[].slice.call(document.querySelectorAll("use[*|href]"))
View svgfixer.js
/**
* SVG Fixer
*
* Fixes references to inline SVG elements when the <base> tag is in use.
* Firefox won't display SVG icons referenced with
* `<svg><use xlink:href="#id-of-icon-def"></use></svg>` when the <base> tag is on the page.
*
* More info:
* - http://stackoverflow.com/a/18265336/796152
* - http://www.w3.org/TR/SVG/linking.html
View $di.ts
/**
* $di.ts
* http://www.xperiments.io/posts/typescript-angularjs-best-practices/
* xperiments on 15/07/14.
*/
module $di
{
/* service */
export class $ng
{
View TypescriptSerializer
module io.xperiments.utils.serialize
{
/**
* The mini
*/
export interface ISerializableObject
{
"@serializable":string;
}
export interface ISerializable extends ISerializableObject
View interlval.js
function interval(func, wait, times){
var interv = function(w, t){
return function(){
if(typeof t === "undefined" || t-- > 0){
setTimeout(interv, w);
try{
func.call(null);
}
catch(e){
t = 0;
View AngularSnippets.md

#Directives

Binding attributes

scope: {
   src:'=' // copy src attr from html element 
  ,exp:'@' // two way data binding and expresion
  ,fnc:'&' // function binding
}
View FxOS => Production.sh
VARIANT=user ./flash.sh gaia
or reset all using:
cd B2G
make reset-gaia PRODUCTION=1
View jsdoc.ts
https://github.com/jsdoc3/jsdoc/issues/272
/**
Description of the namespace.
@namespace My.Namespace
*/
module My.Namespace {
export class SomeClass {
/**
View tscompiler.js
var fs = require('fs');
function createCompiler(outfile, outerr, libFiles){
// npm install typescript 前提
var nodeModulePath = 'node_modules/typescript/bin/typescript.js';
require('vm').runInThisContext(fs.readFileSync(nodeModulePath), 'typescript.js');
var ts = TypeScript;
var compiler = new ts.TypeScriptCompiler(outfile, outerr);