Skip to content

Instantly share code, notes, and snippets.

View rot26's full-sized avatar
💬
is typing...

Chris Coleman rot26

💬
is typing...
  • Denver, Colorado, United States
  • 03:27 (UTC -06:00)
View GitHub Profile
@rot26
rot26 / browser
Created October 21, 2015 22:35 — forked from defunkt/browser
pipe html to a browser
#!/bin/sh -e
#
# Usage: browser
# pipe html to a browser
# e.g.
# $ echo '<h1>hi mom!</h1>' | browser
# $ ron -5 man/rip.5.ron | browser
if [ -t 0 ]; then
if [ -n "$1" ]; then
@rot26
rot26 / objects-over-classes.md
Created October 7, 2018 16:21 — forked from indiesquidge/objects-over-classes.md
We are better off avoiding ES6 classes in JavaScript when possible

Plain JavaScript objects are better than classes when they can be used, and many popular modern frameworks have adopted their use.

Consider that in React a component can be created as either a class or as an object.

// using a class
class Welcome extends React.Component {
  render() {
 Hello, {this.props.name}
@rot26
rot26 / grep_xlsx_files.sh
Created May 31, 2019 14:33 — forked from modille/grep_xlsx_files.sh
Recursively find and grep through multiple Excel spreadsheets
# convert *.xlsx to *.xlsx.csv using https://github.com/dilshod/xlsx2csv
pip install xlsx2csv
# (shell-fu from http://stackoverflow.com/a/12965604)
find . -iname "*.xlsx" -exec sh -c 'xlsx2csv "$1" > "$1.csv"' x {} \;
# grep .csv files
brew install ripgrep
rg -i -g "*.csv" "waldo"
# ...or plain ole grep