These keyboard shortcuts will work in most, if not all text editing places in macOS. (Form input, text editors, web browsers etc.) These keyboard shortcuts will also work on Windows (replace CMD with CTRL).
ALT + Left/Right
Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:
Up Arrow
: Will show your last commandDown Arrow
: Will show your next commandTab
: Will auto-complete your commandCtrl + L
: Will clear the screen<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Page Three</title> | |
</head> | |
<body> | |
<h1 id="head">This is page three</h1> | |
</body> |
import produce from 'immer'; | |
const like = item => ({ | |
type: like.type, | |
payload: item | |
}); | |
like.type = 'user/like'; | |
const initialState = { | |
name: 'Anonymous', |
// bad time = Date.now() | |
/* | |
const foo = await fetchFoo() | |
const bar = await fetchBar() | |
const baz = await fetchBaz() | |
*/ | |
// Good | |
const time = Date.now() | |
const [foo, bar, baz] = await Promise.all([fetchFoo(), fetchBar(), fetchBaz()]); |
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"jest": true, | |
"node": true | |
}, | |
"extends": [ | |
"airbnb", | |
"plugin:@typescript-eslint/recommended", |
@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap'); | |
:root { | |
--font-size: 2rem; | |
--font: Arial, Helvetica, sans-serif; | |
--font-styled: Roboto; | |
--main-bg-color: lightblue; | |
--clr-primary: lightblue; | |
--clr-light: #f4f4f4; | |
--clr-dark: #333; |
Get Query String Parameters | |
// Assuming "?post=1234&action=edit" | |
var urlParams = new URLSearchParams(window.location.search); | |
console.log(urlParams.has('post')); // true | |
console.log(urlParams.get('action')); // "edit" | |
console.log(urlParams.getAll('action')); // ["edit"] | |
console.log(urlParams.toString()); // "?post=1234&action=edit" |
import * as Sentry from "@sentry/node"; | |
import imagemin from "imagemin"; | |
import mozjpeg from "imagemin-mozjpeg"; | |
import sharp from "sharp"; | |
import isJpg from "is-jpg"; | |
import * as aws from "aws-sdk"; | |
import { Upload } from "../../types/graphqlUtils"; | |
import { generateFilename } from "./generateFilename"; | |
export const s3 = new aws.S3({ |
#A strong system administrator (SA) password: At least 8 characters including uppercase, lowercase letters, base-10 digits and/or non-alphanumeric symbols. | |
version: "3.2" | |
services: | |
mssql: | |
container_name: myMSSQL | |
image: microsoft/mssql-server-linux:2017-latest | |
volumes: | |
- ./.db:/var/opt/mssql/ | |
- /var/opt/mssql/data |