Skip to content

Instantly share code, notes, and snippets.

View oyvindsk's full-sized avatar

Øyvind Gerrard Skaar oyvindsk

View GitHub Profile
@oyvindsk
oyvindsk / Content-addressable storage on GCS test
Last active November 21, 2018 20:24
Testing a simple "Content-addressable storage" using only Google Cloud Storage
Content-addressable storage
====================================
- Pretty cool, many unusual properties when compared to normal filesystems etc
- If you have the content you know the address. If you have the address, you know what the content should hash to.
- Used by most distributed file-stores and many filesystems
- Immutable (in the sense that a file can't be updated, a new one is created)
- Can give de-duplication for free
- Helps with syncing and "multiple writers" becasue there's no chance of overwriting data
@oyvindsk
oyvindsk / foo.sh
Last active May 19, 2016 09:23
go vet on closed over loop
# One might think this "should" be caught by go vet, but it's not in my simple test.
#
# From go doc cmd/vet:
##
## Range loop variables
##
## Flag: -rangeloops
##
## Incorrect uses of range loop variables in closures.
##