-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
Why would you want to do this? Because you often don't need more. It's nice to not have to think about your "router" as this big special thing.
Instead, with this approch, your app's current pathname
is just another piece of state, just like anything else.
This also means that when doing server-side rendering of a redux app, you can just do:
var app = require('your/redux/app')
var React = require('react')
I will maybe someday get around to dusting off my C and making these changes myself unless someone else does it first.
Imagine a long-running development branch periodically merges from master. The
git log --graph --all --topo-order
is not as simple as it could be, as of git version 1.7.10.4.
It doesn't seem like a big deal in this example, but when you're trying to follow the history trails in ASCII and you've got several different branches displayed at once, it gets difficult quickly.
{ | |
// The block has begun, we're in a new block scope. The TDZ for the "a" binding has begun | |
var f = function() { | |
// 2. Because f() is evaluated before `a` is actually declared, | |
// an exception will be thrown indicating to the author that | |
// `a` is not yet defined. | |
console.log(a); | |
}; | |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
package main | |
import ( | |
"fmt" | |
"log" | |
"strings" | |
) | |
// Ops | |
const ( |
-- Our goal is to create a type describing a list of events. This is our | |
-- type-level DSL. | |
-- We will then use typeclass resolution to "interpret" this type-level DSL | |
-- into two things: | |
-- 1. A comma-separated list of events | |
-- 2. A method that, when given an event name and a payload, will try to parse | |
-- that event type with the payload. A form of dynamic dispatching | |
-- | |
-- To model a list of types we will use tuples. You can imagine the list of | |
-- types "Int, String, Char" to look like: |