- AWS Lambda@Edge (enabled Preview)
- One Amazon CloudFront Distribution (origin doesn't matter)
- IAM role (basic execution is enough)
- npm to install Node.js dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fmt; | |
#[derive(Copy,Clone)] | |
enum CellState { Dead, Alive } | |
impl fmt::Display for CellState { | |
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | |
let printable = match *self { | |
CellState::Alive => 'x', | |
CellState::Dead => ' ', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Under WTFPL license ;) | |
function ancestors(obj) { | |
var hierarchy = []; | |
if (['boolean', 'number', 'string', 'undefined'].indexOf(typeof obj) !== -1 || obj === null) { // primitives types | |
obj = Object(obj); | |
} else if (typeof obj === 'function') { | |
hierarchy.push( | |
obj.name || | |
(obj.toString().match(/function (\w*)/) || | |
obj.toString().match(/\[object (\w*)\]/))[1] || |
Commonly used scientific symbols in pandoc markdown
encoding is UTF-8, needs xelatex, like this:
---
output:
pdf_document:
latex_engine: xelatex
---
NewerOlder