#Comprehensive Introduction to @ngrx/store By: @BTroncone
Written version of future egghead.io video series.
FROM rust:1.22.1 | |
WORKDIR /usr/src | |
RUN git clone --branch 2.9.4 https://github.com/pornel/dssim.git | |
WORKDIR /usr/src/dssim | |
RUN cargo build --release | |
ENTRYPOINT [ "/usr/src/dssim/target/release/dssim" ] |
// não precisa de um objeto ou estado a ser guardado | |
(function () { | |
function callMeMaybe() { | |
setTimeout(() => { | |
console.log('Node.js POA @ Umbler ' + x); | |
callMeMaybe(); | |
}, 1000); | |
} | |
callMeMaybe(); |
// from: https://github.com/devongovett/pdfkit/issues/29#issuecomment-103121102 | |
/** | |
* Parses an input String with the help of the "marked"-package and writes the corresponding elements to the supplied document | |
* @param doc - the PDFDocument to write to | |
* @param input - the input String | |
* @returns {object} - the document for chaining | |
*/ | |
PDFDocument.parseMarkdown = function (doc, input){ | |
// Array of markdown parts as objects |
require('symbol-observable') | |
var $$observable = Symbol.observable | |
var rxjs = require("rxjs") | |
var Observable = rxjs.Observable | |
var Subject = rxjs.Subject | |
var o = new Subject() | |
var EventEmitter = class { | |
next(item) { | |
if (typeof this.observer === 'function') { |
/** | |
Mixes in objects in `properties` into a class. | |
To be used as a decorator. | |
@mixin({...}) | |
class MyClass {...} | |
*/ | |
function mixin(properties: {[key: string]: any}): Function { | |
if (properties == null) { | |
throw new Error(`Argument for 'properties' is required.`); |
class CustomError extends Error { | |
get name(): string { return 'CustomError'; }; | |
public stack: any; | |
constructor(public code: number, public message: string) { | |
super(message); | |
if (typeof (<any>Error).captureStackTrace === 'function') { | |
(<any>Error).captureStackTrace(this, this.constructor); | |
} else { |
function toJSON(object, fieldsToOmit) { | |
const map = new Map(); | |
let index = 0; | |
return JSON.stringify(object, (key, value) => { | |
if (~fieldsToOmit.indexOf(key)) return undefined; | |
return value != null && typeof value === 'object' | |
? map.get(value) || (map.set(value, '$' + ++index), value) | |
: value; | |
}, 2); | |
} |
var webpack = require('webpack'); | |
var path = require('path'); | |
// Webpack Config | |
var webpackConfig = { | |
entry: { | |
'polyfills': './src/polyfills.browser.ts', | |
'vendor': './src/vendor.browser.ts', | |
'main': './src/main.browser.ts', |
#Comprehensive Introduction to @ngrx/store By: @BTroncone
Written version of future egghead.io video series.
This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded
that can be called on DOM elements.
Just use the code in index.js
in your app or website. You can see usage in the test page test.html
.
The parent element will only scroll if the element being called is out of the view. The boolean can force the element to be centered in the scrolling area.