By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
pg_dump database -Fc backup.dump | |
pg_restore -l backup.dump | sed '/MATERIALIZED VIEW DATA/d' > restore.lst | |
pg_restore -L restore.lst -d database backup.dump | |
pg_restore -l backup.dump | grep 'MATERIALIZED VIEW DATA' > refresh.lst | |
pg_restore -L refresh.lst -d database backup.dump |
'use strict'; | |
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function() { | |
// Update 'version' if you need to refresh the cache | |
var staticCacheName = 'static'; | |
var version = 'v1::'; |
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
#!/bin/sh | |
set -e | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
BLUE='\033[0;34m' | |
NC='\033[0m' | |
mkdir -p log | |
echo -e "${GREEN}Checking for wine...${NC}" |
AZHU.storage = { | |
save : function(key, jsonData, expirationMin){ | |
if (!Modernizr.localstorage){return false;} | |
var expirationMS = expirationMin * 60 * 1000; | |
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime() + expirationMS} | |
localStorage.setItem(key, JSON.stringify(record)); | |
return jsonData; | |
}, | |
load : function(key){ | |
if (!Modernizr.localstorage){return false;} |
var normalize = System.normalize; | |
System.normalize = function (name, parentName, parentAddress) { | |
console.log("normalize: " + JSON.stringify({ | |
name: name, | |
parentName: parentName, | |
parentAddress: parentAddress | |
})); | |
return normalize.call(this, name, parentName, parentAddress); | |
}; |
This is an example of the power of the D3 library and how you can use the drag behavior of D3 to control the position and shape of the SVG element.
If you're using SystemJS in the browser, you'll want to update your System config to point at the bundles, if you're not already.
System.config({
//use typescript for simple compilation (no typechecking)
//transpiler: 'typescript',
//typescript compiler options
//typescriptOptions: {
//emitDecoratorMetadata: true
//},
// https://vsavkin.com/functional-typescript-316f0e003dc6 | |
class Employee { | |
constructor(public name: string, public salary: number) {} | |
} | |
class Department { | |
constructor(public employees: Employee[]) {} | |
works(employee: Employee): boolean { |