Skip to content

Instantly share code, notes, and snippets.

Avatar
🚲
👍

maxb max-b

🚲
👍
  • Oakland, CA
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am max-b on github.
  • I am maxbee (https://keybase.io/maxbee) on keybase.
  • I have a public key ASBQf0r9CgFAPZ_UnwJ4CDuv1XkDyQ-pllLj33GAbrKduQo

To claim this, I am signing this object:

@max-b
max-b / Map.js
Created Apr 16, 2018
Search code for Recurse interview
View Map.js
const _ = require('lodash');
const Node = require('./Node');
class Map {
constructor(nodes = []) {
this.nodes = nodes;
this.maxNodes = 1000;
}
@max-b
max-b / .tmux.conf
Created Apr 6, 2018
Example of tmux config with more than 2 conditional bindings to single key. Useful for vim-tmux-navigation
View .tmux.conf
# Smart pane switching with awareness of vim and fzf and ctrlp
forward_programs="view|n?vim?|ctrlp"
should_forward="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?($forward_programs)(diff)?$'"
bind -n C-h if-shell "$should_forward" "send-keys C-h" "run-shell '[ #{pane_at_left} -eq 1 ] && tmux previous-window || tmux select-pane -L'"
bind -n C-l if-shell "$should_forward" "send-keys C-l" "run-shell '[ #{pane_at_right} -eq 1 ] && tmux next-window || tmux select-pane -R'"
bind -n C-j if-shell "$should_forward" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$should_forward" "send-keys C-k" "select-pane -U"
bind -n C-\ if-shell "$should_forward" "send-keys C-\\" "select-pane -l"
View npm-config-list.stdout
; cli configs
long = true
scope = ""
user-agent = "npm/4.0.5 node/v6.9.2 linux x64"
; default values
access = null
also = null
always-auth = false
bin-links = true
@max-b
max-b / npm-debug.log
Created Jan 5, 2017
`npm search node-sass` error log
View npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/home/maxb/.nvm/versions/node/v6.9.2/bin/node',
1 verbose cli '/home/maxb/.nvm/versions/node/v6.9.2/bin/npm',
1 verbose cli 'search',
1 verbose cli 'node-sass' ]
2 info using npm@4.0.5
3 info using node@v6.9.2
4 verbose config Skipping project config: /home/maxb/.npmrc. (matches userconfig)
5 silly mapToRegistry name -/all
6 silly mapToRegistry using default registry
@max-b
max-b / 02_network
Created Apr 29, 2015
/etc/uci-defaults files
View 02_network
#!/bin/sh
#
# Copyright (C) 2011 OpenWrt.org
#
[ -e /etc/config/network ] && exit 0
touch /etc/config/network
. /lib/functions/uci-defaults.sh
You can’t perform that action at this time.