Skip to content

Instantly share code, notes, and snippets.

View cwonrails's full-sized avatar

Chris Watson cwonrails

View GitHub Profile
@cwonrails
cwonrails / hosts
Last active January 31, 2022 14:57 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
Import "../Mods/ModUtil/ModUtil.lua"
Import "Color.lua"
Import "UIPresentation.lua"
Import "UIScripts.lua"
Import "CreditsScripts.lua"
Import "EventPresentation.lua"
Import "AudioScripts.lua"
Import "Narrative.lua"
Import "CodexData.lua"
Import "GiftData.lua"
@cwonrails
cwonrails / Gemfile
Created July 2, 2020 16:50 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers

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]

#!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