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
import produce from 'immer'; | |
import {createStore} from 'redux'; | |
const handleActions = (actionsMap, defaultState) => ( | |
state = defaultState, | |
{type, payload} | |
) => | |
produce(state, draft => { | |
const action = actionsMap[type]; | |
action && action(draft, payload); |
import { createCipheriv, createDecipheriv, randomBytes } from "crypto"; | |
const ENCRYPTION_KEY: string = process.env.ENCRYPTION_KEY || ""; // Must be 256 bits (32 characters) | |
const IV_LENGTH: number = 16; // For AES, this is always 16 | |
/** | |
* Will generate valid encryption keys for use | |
* Not used in the code below, but generate one and store it in ENV for your own purposes | |
*/ | |
export function keyGen() { |
defmodule Turbolinks do | |
@moduledoc """ | |
in `web.ex` | |
replace `use Phoenix.Controller` with `use Turbolinks` | |
in `router.ex` add a the plug | |
plug Turbolinks | |
""" | |
use Plug.Builder |
name | wikipedia_url | |
---|---|---|
A# .NET | https://en.wikipedia.org/wiki/A_Sharp_(.NET) | |
A# (Axiom) | https://en.wikipedia.org/wiki/A_Sharp_(Axiom) | |
A-0 System | https://en.wikipedia.org/wiki/A-0_System | |
A+ | https://en.wikipedia.org/wiki/A%2B_(programming_language) | |
A++ | https://en.wikipedia.org/wiki/A%2B%2B | |
ABAP | https://en.wikipedia.org/wiki/ABAP | |
ABC | https://en.wikipedia.org/wiki/ABC_(programming_language) | |
ABC ALGOL | https://en.wikipedia.org/wiki/ABC_ALGOL | |
ABSET | https://en.wikipedia.org/wiki/ABSET |
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
var crypto = require('crypto'); | |
// larger numbers mean better security, less | |
var config = { | |
// size of the generated hash | |
hashBytes: 32, | |
// larger salt means hashed passwords are more resistant to rainbow table, but | |
// you get diminishing returns pretty fast | |
saltBytes: 16, | |
// more iterations means an attacker has to take longer to brute force an |