Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<script>
(() => {
const voidTags = ['area', 'base', 'br', 'circle', 'col', 'ellipse',
'embed', 'img', 'input', 'line', 'link', 'mesh', 'meta', 'param',
'path','polygon','polyline','rect','source','track','wbr']
const h = (tag, data, children) => {
let attrs = ''

You don't need CORS Middleware 2019

A node example using Zeit's Micro.

const micro = require('micro')

const server = micro(async (request, response) => {
 // set response headers

WebApp Rendering Strategies 2019

Client Side Rendering

Tooling: Hyperapp, Mithril, React, Vue

Pros

  • Dynamic Routing. There's no refresh when routing between pages.

Cons

  • JavaScript must be downloaded before the page can begin to render, slowing down first paint performance.[1]
diskutil eraseDisk FAT32 "WINDOWS10" MBRFormat disk2
sudo newfs_msdos -F 32 -c 16 disk2
cp -rp /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WINDOWS10/
window.fetch('sunset.jpg')
.then(res => {
const reader = res.body.getReader()
let result = new Uint8Array()
const processImage = ({ done, value }) => {
if (done) {
console.log('done')
const env = process.env
let result = ''
for (let key in env) {
result += '$' + key + ': \'' + env[key] + '\';\n'
}
process.stdout.write(result)
Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.
#!/bin/sh
echo 'Show hidden files in finder'
defaults write com.apple.finder AppleShowAllFiles yes; killall Finder
echo 'Lock the size of the dock'
defaults write com.apple.dock size-immutable -bool yes; killall Dock
echo 'Delete all .DS_Store files'
sudo find / -name ".DS_Store" -depth -exec rm {} \;