Skip to content

Instantly share code, notes, and snippets.

@bcomnes
bcomnes / gist:3257682194fc92087a74ee4972e9bcce
Created January 28, 2017 17:00
2017 New years reading list
# 2017 New Years Reading List
Here's what has my attention at the beginning of the new years.
@bcomnes
bcomnes / late-2016-reading.md
Last active April 17, 2021 20:07
Late 2016 Reading list
@bcomnes
bcomnes / delete-merged.sh
Created September 15, 2016 01:52
deletes merged branches
#!/usr/bin/env bash
git branch -r --merged |
grep origin |
grep -v '>' |
grep -v 'master' |
xargs -L1 |
awk '{sub(/origin\//,"");print}' |
xargs git push origin --delete
class ReactComponent extends Component {
constructor (props) {
super(props)
this.classMethod = this.classMethod.bind(this)
}
classMethod () {
// do soemthing with 'this'
}
bret-mbr:testrun bret$ node generate.js
key is <Buffer 09 19 de 78 56 e7 dc 1a a8 c4 88 d5 1a b9 5d e7 4c 20 5e 5c e6 6e 94 12 6e 14 4e b5 13 10 e7 ca>
_stream_readable.js:561
var ret = dest.write(chunk);
^
TypeError: dest.write is not a function
at ReadStream.ondata (_stream_readable.js:561:20)
at emitOne (events.js:96:13)
at ReadStream.emit (events.js:188:7)
@bcomnes
bcomnes / .gitignore
Last active June 22, 2016 17:15
Testing random-access-http and hypercore
node_modules
*.db
*.mp4
firewall {
all-ping enable
broadcast-ping disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name WAN_IN {
default-action drop
description "WAN to internal"
package main
import (
"encoding/base64"
"fmt"
"os"
"strings"
)
const (
10:53 <bret> i like how react/redux works. i don't like the tool chain very much
10:54 <bret> its a good place to start to understand how view systems that take the always re-render strategy like react does
10:54 <bret> there are alternatives that are less documented but more minimal: https://github.com/Raynos/mercury
10:55 <substack> yo-yo or virtual-dom+main-loop are pretty nice alternatives that give you the basic architecture without the toolchain complexity
10:55 <substack> or bloat
10:55 <bret> https://github.com/shama/bel yeah yo yo too
10:55 <minskmaz> yeah my biggest complaint compes from from simple abstractions becoming huge apis
10:56 <substack> minskmaz: yo-yo/bel and virtual-dom/main-loop are basically finished except for bug fixes and extremely minor feature additions
10:56 <minskmaz> substack: I’ll check it out - how is it for 2 way binding ?
10:57 <substack> instead of 2-way binding, I use an event emitter to trigger state transitions
@bcomnes
bcomnes / delete_merged.sh
Created April 30, 2016 01:15
Delete merged branches on git
#!/usr/bin/env bash
git branch -r --merged |
grep origin |
grep -v '>' |
grep -v 'master' |
xargs -L1 |
awk '{sub(/origin\//,"");print}' |
xargs git push origin --delete