Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
(async function generateReplies(document) { | |
// https://conventionalcomments.org/#labels | |
const LABEL = { | |
praise: "praise", | |
nitpick: "nitpick", | |
suggestion: "suggestion", | |
issue: "issue", | |
todo: "todo", | |
question: "question", | |
thought: "thought", |
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.
This is my own variant of a git branching diagram template based on Bryan Braun's great template.
You can use this diagram as a template to create your own git branching diagrams. Here's how:
https://gist.githubusercontent.com/dornfeder/13abff279de357f048e474d4ed6c692d/raw/f5efc838bd34429e59e38063bd348b7a86457d18/git-diagram-template.xml
.box { | |
display: block; | |
background: red; | |
width: 200px; | |
height: 200px; | |
opacity: 1; | |
} | |
.box-hidden { | |
display: none; |
const express = require('express'); | |
const { html, Component } = require('htm/preact'); | |
const renderToString = require('preact-render-to-string'); | |
class App extends Component { | |
render(props) { | |
return html` | |
<div class="app"> | |
<h1>This is an app</h1> | |
<p>Current server time: ${new Date + ''}</p> |
import { useState, useMemo } from "react"; | |
// Usage example (booleans) | |
const userActivity = useStatus([true, false]); | |
userActivity.status; // true | |
userActivity.toggle(); | |
userActivity.setTrue(); | |
userActivity.setFalse(); | |
userActivity.reset(); |