Skip to content

Instantly share code, notes, and snippets.

View cwonrails's full-sized avatar

Chris Watson cwonrails

View GitHub Profile
#!usr/bin/env bash
## Get latest version of node LTS (currently node 8)
VERSION=`curl -s http://nodejs.org/dist/latest-carbon/SHASUMS256.txt | awk '/node-v/ {print $2}' | head -1 | sed s/node-v// | sed s/-/\ / | awk '{print $1}'`
url="https://nodejs.org/dist/v"$VERSION"/node-v"$VERSION"-linux-x64.tar.gz"
curl $url | tar -xz
## Get latest version node (currently 9)
# VERSION=`curl -s http://nodejs.org/dist/latest/SHASUMS256.txt | awk '/node-v/ {print $2}' | head -1 | sed s/node-v// | sed s/-/\ / | awk '{print $1}'`
# url="https://nodejs.org/dist/v"$VERSION"/node-v"$VERSION"-linux-x64.tar.gz"
@cwonrails
cwonrails / bret_victor-reading_list.md
Created January 9, 2018 15:42 — forked from nickloewen/bret_victor-reading_list.md
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

#!/usr/bin/env bash
find node_modules \( -name '.*ignore' -o \
-name '.documentup.json' -o \
-name '.editorconfig' -o \
-name '.eslintrc' -o \
-name '.eslintrc.*' -o \
-name '.flowconfig' -o \
-name '.gitattributes' -o \
-name '.idea' -o \
@cwonrails
cwonrails / node-prune.sh
Last active December 15, 2017 15:36 — forked from themanifold/node-prune.sh
Pruning useless node_modules with bash userland tools (find etc)
#!/usr/bin/env bash
find node_modules \( -name '__tests__' -o \
-name 'tests' -o \
-name 'powered-test' -o \
-name 'docs' -o \
-name 'doc' -o \
-name '.idea' -o \
-name '.vscode' -o \
-name 'website' -o \
#!/bin/sh
DL='wget -q'
BASEURL='https://unpkg.com'
STYLESDIR='src/css/vendor'
if [ ! -d "$STYLESDIR" ]; then
mkdir -p $STYLESDIR
fi
#!/bin/sh
DL='wget -q'
BASEURL='https://unpkg.com'
STYLESDIR='src/css/vendor'
if [ ! -d "$STYLESDIR" ]; then
mkdir -p $STYLESDIR
fi
#!/usr/bin/env bash
function lazygit() {
git add .
git commit -a -m "$1"
git push
}
function upgrade-nvm() {
(
@cwonrails
cwonrails / how-to-set-up-stress-free-ssl-on-os-x.md
Created October 21, 2017 17:26 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

JQL Syntax for the Impatient

There are a few JQL syntax bits to get you started:

  • AND --- allows you to add qualifiers to a list
  • != Thing --- target one thing
  • is in (List, Of, Things) --- target a bunch of things (Done, Closed, Resolved) typically
  • not in (List, of, Things) --- do not include a bunch of things
  • -1w --- relative time. You can also use -1d for day
  • "2015/3/15" --- specific dates
@cwonrails
cwonrails / .hyperterm.js
Created October 10, 2017 17:31 — forked from marcbachmann/.hyperterm.js
hyperterm config
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12.5,
// font family with optional fallbacks
fontFamily: '"Meslo LG S for Powerline", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color (hex)
cursorColor: 'rgba(255,255,255,.4)',