const Store = {
name: 'My Name',
counter: 0
}
window.Store = Store; // Convenient!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: ./goestiles ~/goes17 2020-04-02 | |
# Makes a video like this: https://twitter.com/lxe/status/1248117991067095040 | |
# Requirements: imagemagick and ffmpeg | |
ROOT=$1 | |
DATE=$2 | |
# Clean up |
Also see the original Pieter Noordhuis's guide
You need:
- Raspberry Pi Model B (or B+) with a MicroSD Card $35-40
- An RTL-SDR dongle:
Let's say a library developer Bob builds a module/library that exports a reducer and and action. He publishes the module to npm:
const INITIAL_STATE = { timesPoked : 0 };
export function makeSharedModuleAction(payload) {
return { 'type': 'POKE', payload };
}
export function sharedModuleReducer(state = INITIAL_STATE, action) {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const winsIfSwitched = []; | |
const winsIfStayed = []; | |
function monty () { | |
const doorWithCar = Math.floor(Math.random() * 3); | |
const guessedDoor = Math.floor(Math.random() * 3); | |
// Host removes a door that... | |
const removedDoor = [0,0,0].reduce((result, n, index) => { | |
// 1) contestant didn't pick and... |
I hereby claim:
- I am lxe on github.
- I am lxe (https://keybase.io/lxe) on keybase.
- I have a public key whose fingerprint is A5EB BBE1 8756 D076 7335 5299 DB75 F538 D74F 76CF
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"reflect" | |
"strconv" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# set -x | |
# Stupid Simple Semver range validator | |
# (no build metadata and no prereleases, and no multiple ranges (||)) | |
# Prints a list of versions that match a semver range | |
# ./semver.sh "range" version version version... |
...since nothing in that file should be accessing that 'MyComponent' except the export.
Also that react import is very confusing though. Why do I need it?
I don't reference that variable anywhere... oh wait some tool compiles the JSX for me at some point into React.createElement
or whatever. Very opaque:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/gl$ npm ls | |
[email protected] /Users/aleksey/gl | |
βββ¬ [email protected] | |
βββ [email protected] | |
βββ [email protected] | |
βββ¬ [email protected] | |
β βββ¬ [email protected] | |
β βββ¬ [email protected] | |
β β βββ [email protected] | |
β β βββ [email protected] |