Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
import { getContext, setContext } from "svelte"; | |
/** | |
* The context object. | |
*/ | |
export interface Context<T> { | |
get: () => T; | |
set: (ctx: T) => T; | |
} |
// based on https://stackoverflow.com/a/56678483/65387 | |
type RGB = [r: number, g: number, b: number] | |
const UNK = 255 / 2 | |
/** | |
* @param hex RGB hex string like "#CCCFDB" | |
* @returns RGB tuple in [0-255] | |
*/ |
import React, { useRef, useLayoutEffect } from "react"; | |
import { StyleSheetManager } from "styled-components"; | |
import PreviewContext from "./PreviewContext"; | |
const WithPreviewContext = ({ children }) => | |
<PreviewContext.Provider value={true}> | |
<main> | |
{children} | |
</main> | |
</PreviewContext.Provider>; |
This is the process of setting up erlang, rebar3, and cowboy for a Hello World, starting with a clean Debian 8 install.
Update apt and install deps:
root@046edcaea45a:~# apt-get update
root@046edcaea45a:~# apt-get install erlang erlang-dev gcc
root@046edcaea45a:~# wget https://s3.amazonaws.com/rebar3/rebar3
root@046edcaea45a:~# mkdir ~/bin/
root@046edcaea45a:~# mv rebar3 ~/bin/
root@046edcaea45a:~# chmod +x ~/bin/rebar3
@font-face { | |
font-family: 'MyWebFont'; | |
src: url('webfont.eot'); /* IE9 Compat Modes */ | |
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ | |
url('webfont.woff') format('woff'), /* Modern Browsers */ | |
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */ | |
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */ | |
} | |
body { |