I wrote this four years ago, so instead use this command:
$ docker rmi $(docker images -q -f dangling=true)
# Stop PostgreSQL from auto starting | |
sudo launchctl unload -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.3.plist | |
# Enable PostgreSQL to auto start | |
sudo launchctl load -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.3.plist | |
# Start postgres | |
$ sudo su postgres | |
Password: | |
bash-3.2$ pg_ctl -D /Library/PostgreSQL/9.3/data/ start |
/* clang hello-asm.c -o hello-asm */ | |
int main() { | |
long write = 0x2000004; /* syscall "write" on MacOS X */ | |
long stdout = 1; | |
char * str = "Hello World\n"; | |
unsigned long len = 12; | |
unsigned long ret = 0; | |
/* ret = write(stdout, str, len); */ | |
__asm__("movq %1, %%rax;\n" | |
"movq %2, %%rdi;\n" |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
export x = 42
/* | |
This example was built using standard create-react-app out of the box with no modifications or ejections | |
to the underlying scripts. | |
In this example, i'm using Google as a social provider configured within the Cognito User Pool. | |
Each step also represents a file, so you can see how I've chosen to organize stuff...you can do it however | |
you'd like so long as you follow the basic flow (which may or may not be the official way....but its what I found that works. | |
The docs are pretty horrible) | |
const React = require("react"); | |
const Lifecycles = React.createLifecycleEvents({ | |
didMount({ setState }) { | |
setState({ | |
disabled: false, | |
}); | |
}, | |
didUpdate({ inputRef }) { | |
if (document.activeElement !== inputRef.value) { |
import { useState, useEffect } from "react"; | |
export type AsyncState<T> = | |
| { loading: false; error?: undefined; value?: undefined } | |
| { loading: true; error?: undefined; value?: undefined } | |
| { loading: false; error: Error; value?: undefined } | |
| { loading: false; error?: undefined; value: T }; | |
export type AsyncUtils<C extends {}, A extends any[]> = { | |
setArgs: (args: A | undefined) => void; |
An improvised draft of JSON Expression grammar in ABNF:
JsonExpression = "[" Operator Operands "]" ; JSON-expression is itself a valid JSON array
Operator = JsonLiteral ; Operator is any JSON value, but usually a string
Operands = 1*("," Operand) ; Non-nullary expression has at least one operand