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 |
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| (async function generateReplies(document) { | |
| // https://conventionalcomments.org/#labels | |
| const LABEL = { | |
| praise: "praise", | |
| nitpick: "nitpick", | |
| suggestion: "suggestion", | |
| issue: "issue", | |
| todo: "todo", | |
| question: "question", | |
| thought: "thought", |
| import { useState, useMemo } from "react"; | |
| // Usage example (booleans) | |
| const userActivity = useEnum([true, false]); | |
| userActivity.status; // true | |
| userActivity.toggle(); | |
| userActivity.setTrue(); | |
| userActivity.setFalse(); | |
| userActivity.reset(); |
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| # 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 |
| .ellipsis { | |
| position: relative; | |
| } | |
| .ellipsis:before { | |
| content: ' '; | |
| visibility: hidden; | |
| } | |
| .ellipsis span { |
| 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> |
| module.exports = { | |
| /** | |
| * Print Width | |
| * https://prettier.io/docs/en/options.html#print-width | |
| * | |
| * Specify the line length that the printer will wrap on. | |
| * | |
| * printWidth: <int> | |
| * default: 80 | |
| */ |