- vim (actually neovim)
- fzf.vim
- history search
- buffer search
- git file search
- ale
- polyglot language pack
- fzf.vim
- nerdtree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ -z "$1" ]; then | |
echo 'first arg should be module to search up for' | |
exit 1 | |
fi | |
BLUE=$(tput setaf 4) | |
GREEN=$(tput setaf 2) | |
RED=$(tput setaf 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# vim: set syntax=sh | |
ps aux | grep -v "grep" | grep "Microsoft Outlook" > /dev/null | |
outlook_ret=$? | |
day=`date +%u` | |
# Make sure it's a weekday and Outlook is running | |
if [ "$day" -ge 1 -a "$day" -le 5 -a "$outlook_ret" -gt 0 ]; then | |
osascript -e 'display notification "Please start Outlook" with title "Nag Bot"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# vim: set syntax=sh: | |
set -e | |
if ! hash kubectl 2>/dev/null; then echo "Please install \`kubectl\` before running this command (https://kubernetes.io/docs/tasks/tools/install-kubectl/)"; exit 1; fi | |
if ! hash fzf 2>/dev/null; then echo "Please install \`fzf\` before running this command (https://github.com/junegunn/fzf#installation)"; exit 1; fi | |
selection=`kubectl get pods --all-namespaces | grep -v 'NAMESPACE' | fzf --header "Select a pod..."` | |
namespace=`echo "$selection" | awk '{ print $1 }'` | |
pod=`echo "$selection" | awk '{ print $2 }'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const app = express() | |
const util = require('util') | |
app.get('*', function (req, res) { | |
process.stdout.write('\033c') | |
console.log('Request headers:') | |
console.log(util.inspect(req.headers, { colors: true })) | |
res.send('test') |
I hereby claim:
- I am jondlm on github.
- I am jondlm (https://keybase.io/jondlm) on keybase.
- I have a public key ASC_5JYWh3CFrnJz3NXg7TvFiSOro4iFH_34JiJARHnMGQo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make sure you have a `bundle.js` file in the current dir and run this like: | |
// # go run webpack_bundle_analysis.go | sort -n | |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"regexp" | |
"strings" |
React introduced shallow rendering in 0.13. This is an excellent feature that I wish was included earlier in React. It aims to solve the problem of unit testing components without going through a real, or jsdom mocked, DOM. I couldn't find any info online about what lifecycle events it actually fires. So I did some testing of my own. To reproduce, put component.js
and test.js
into a folder and run node test.js
.
TLDR; shallow rendering only invokes the following lifecycle hooks (in order):
getDefaultProps
getInitialState
componentWillMount
stops here until re-rendercomponentWillReceiveProps
shouldComponentUpdate
componentWillUpdate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data: { | |
"event": "response", | |
"timestamp": 1436046421423, | |
"id": "1436046421423:jdelamotte:5282:ibpkyk17:10001", | |
"instance": "http://jdelamotte:8888", | |
"labels": [], | |
"method": "get", | |
"path": "/js/bundle.js", | |
"query": {}, | |
"responseTime": 8, |
NewerOlder