Skip to content

Instantly share code, notes, and snippets.

View ungoldman's full-sized avatar
🤔
💭

Nate Goldman ungoldman

🤔
💭
View GitHub Profile
@kuanb
kuanb / identify_intersections.ipynb
Last active November 30, 2020 23:04
Inspired by this Twitter thread, this is a DIY version to generate similar maps: https://twitter.com/82_Streetcar/status/1333076980032532480
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@seeliang
seeliang / lint-only-changed-files.MD
Last active June 10, 2024 05:37
How to lint only changed files?

find out the differences

use git diff to generate file list

git diff --name-only master

limited to certain file types

add ext filter

@dphiffer
dphiffer / unpopular_baby_names.py
Last active December 29, 2018 18:24
What are the least popular American baby names? Sorted by the year of first usage.
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):
@ungoldman
ungoldman / choo-store.js
Last active July 24, 2018 09:24
sketch of a simple wrapper for predictable, namespaced choo stores
/*
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) {
@mafintosh
mafintosh / bitcoin-for-laypeople.md
Last active April 1, 2020 12:46
Blog post about how Bitcoin works in a way non computer people can understand it

Bitcoin for laypeople

(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.

@mathiask88
mathiask88 / gist:b69435d101e1b23affd52580e5dbea07
Created August 23, 2017 16:50
nan dependents by downloads per month
[
{
"name": "fsevents",
"downloads": 6335677
},
{
"name": "node-sass",
"downloads": 5065472
},
{
@claus
claus / ipfs-server-setup.md
Last active May 9, 2023 03:51
Host Your Site Under Your Domain on IPFS

Host Your Site Under Your Domain on IPFS

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).

Install IPFS

Log in as root.

First, make sure the system is up to date, and install tar and wget:

@creationix
creationix / idb-dat-storage.js
Created August 8, 2017 22:40
A simple abstract-random-access implementation using indexed DB that takes advantage of hypercore's behavior or consistent boundaries/offsets.
/* 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 = () => {
@ungoldman
ungoldman / computer-ethics.md
Last active September 14, 2023 09:18
Resources on Computer Ethics