Skip to content

Instantly share code, notes, and snippets.

View fxck's full-sized avatar

Aleš fxck

View GitHub Profile
{
"3/7": {[
"project_main",
]
},
"4/7": {
"1/6": [
"tracked_estimated",
"estimated_profit",
"revenue",
@fxck
fxck / gist:d65255218de3611df3cd
Created January 13, 2015 20:53
Adjusted parser to render paragraphs which only contain a single image without the paragraph. So instead <p><img ...></p> it just renders <img ...>
<?php
/**
* Adjusted parser to render paragraphs which only contain a single image without the paragraph.
*
* So instead
* <p><img ...></p>
*
* it just renders
* <img ...>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="lib/angular2.js"></script>
</head>
<body>
<hello>
Loading...
import {bootstrap} from 'angular2/angular2';
import {ROUTER_BINDINGS} from 'angular2/router';
import {HTTP_BINDINGS} from 'angular2/http';
import {App} from './app/app';
bootstrap(App, [ROUTER_BINDINGS, HTTP_BINDINGS]);
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var concat = require('gulp-concat');
var fileSystem = require('fs');
var PATHS = {
TS: {
src: 'src/bootstrap.ts',
src: 'src/**/*.ts'
},
import * as Rx from 'rx';
---
import * as Rx from '@reactivex/rxjs';
---
import * as Rx from '../../vendor/angular2/node_modules/@reactivex/rxjs/dist/cjs/Rx';
import { createStore } from 'redux'
/**
* This is a reducer, a pure function with (state, action) => state signature.
* It describes how an action transforms the state into the next state.
*
* The shape of the state is up to you: it can be a primitive, an array, an object,
* or even an Immutable.js data structure. The only important part is that you should
* not mutate the state object, but return a new object if the state changes.
*
System.config({
baseURL: "/",
defaultJSExtensions: false,
transpiler: "typescript",
typescriptOptions: {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"module": "system",
"moduleResolution": "node",
_postGetHandler: function(method, url, data, callback, type) {
var self = this;
if ($.isFunction(data)) {
type = type || callback;
callback = data;
data = undefined;
}
self.ajax({
currencyFilter.$inject = ['$locale'];
function currencyFilter($locale) {
var formats = $locale.NUMBER_FORMATS;
return function(amount, currencySymbol){
if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;
return formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).
replace(/\u00A4/g, currencySymbol);
};
}