Skip to content

Instantly share code, notes, and snippets.

Chris Watson cwonrails

Block or report user

Report or block cwonrails

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View free-up-space-with-tmutil.md

Each time a user updates to a new Mojave developer or public beta, macOS creates a new local snapshot that eats up space. Free up that space with the following commands:

tmutil listlocalsnapshots /
tmutil deletelocalsnapshots [end of output from above command]

The relevant output from the first command is:

yyyy-mm-dd-[timestamp]

View download-node.bash
#!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"
View bret_victor-reading_list.md

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. ★

View node-prune.sh
#!/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 Dec 15, 2017 — forked from themanifold/node-prune.sh
Pruning useless node_modules with bash userland tools (find etc)
View node-prune.sh
#!/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 \
View update-vendor-stylesheets.sh
#!/bin/sh
DL='wget -q'
BASEURL='https://unpkg.com'
STYLESDIR='src/css/vendor'
if [ ! -d "$STYLESDIR" ]; then
mkdir -p $STYLESDIR
fi
View update-vendor-stylesheets.sh
#!/bin/sh
DL='wget -q'
BASEURL='https://unpkg.com'
STYLESDIR='src/css/vendor'
if [ ! -d "$STYLESDIR" ]; then
mkdir -p $STYLESDIR
fi
View 50 Chrome Extensions.md
@cwonrails
cwonrails / how-to-set-up-stress-free-ssl-on-os-x.md
Created Oct 21, 2017 — 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
View how-to-set-up-stress-free-ssl-on-os-x.md

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

View gist:e04693b47cfa3c934a139b842043e543

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
You can’t perform that action at this time.