use git diff to generate file list
git diff --name-only master
add ext filter
import { | |
getJetstreamOpsByType, | |
isJetstreamCommit, | |
JetstreamEvent, | |
JetstreamFirehoseSubscriptionBase, | |
} from "./jetstream-subscription"; | |
export class JetstreamFirehoseSubscription extends JetstreamFirehoseSubscriptionBase { | |
async handleEvent(evt: JetstreamEvent) { | |
if (!isJetstreamCommit(evt)) return; |
use git diff to generate file list
git diff --name-only master
add ext filter
import csv, os, re | |
# https://www.ssa.gov/oact/babynames/state/namesbystate.zip | |
path_to_names = '.' | |
names = [] | |
index = {} | |
# Iterate over each state file (e.g., CA.TXT). | |
for filename in os.listdir(path_to_names): |
/* | |
Now a real module used in production! | |
https://github.com/ungoldman/choo-store | |
*/ | |
class Store { | |
constructor (opts) { | |
opts = opts || {} |
var html = require('./index') | |
var world = 'xyz' | |
var planet = [ | |
document.createElement('strong') | |
] | |
planet[0].textContent = 'planet' | |
var res = html.render(Main(world, planet)) | |
function Main (world, who) { |
(Chinese version available here, courtesy of @jiangplus
(This is an English translation of my Danish blog post, Bitcoin for voksne)
Bitcoin is a digital currency that has no central authority. It's a currency where you do not have to rely on anyone to know it's worth it. As a concept, it's similar to gold. Gold has a value in itself, as opposed to, say a $100 note that only has value if the U.S. government says it has value. Similarly, the idea of Bitcoins is that they have value by themselves.
Let's try to understand how Bitcoin works.
[ | |
{ | |
"name": "fsevents", | |
"downloads": 6335677 | |
}, | |
{ | |
"name": "node-sass", | |
"downloads": 5065472 | |
}, | |
{ |
This is a step-by-step tutorial for hosting your website under your domain on IPFS, from zero, on a DigitalOcean Ubuntu 16.04.3 x64 Droplet (i am using the $10 variant with 2GB RAM).
Log in as root.
First, make sure the system is up to date, and install tar
and wget
:
/* eslint-env browser */ | |
var Buffer = require('buffer').Buffer | |
var name = 'dat' | |
function withStore (type, block, callback) { | |
var req = indexedDB.open(name + '-db', 1) | |
req.onerror = () => callback(req.error) | |
req.onupgradeneeded = () => req.result.createObjectStore(name) | |
req.onsuccess = () => { |