Skip to content

Instantly share code, notes, and snippets.

View mccv's full-sized avatar

Mark McBride mccv

View GitHub Profile
// Planetary gear bearing (customizable)
$fn=100;
// outer diameter of ring
D=51.7;
// thickness
T=15;
// clearance
tol=0.15;
number_of_planets=5;
@mccv
mccv / bootstrap.conf.tmpl
Created April 28, 2018 03:52
A go template file for configuring the EnvoyProxy to talk to an XDS server for LDS/CDS
{
"node": {
"id": "{{envOrDefault "ENVOY_NODE_ID" "some-node"}}",
"cluster": "{{envOrDefault "ENVOY_NODE_CLUSTER" "some-cluster"}}",
"locality": {
"zone": "{{envOrDefault "ENVOY_NODE_ZONE" "some-zone"}}"
}
},
"static_resources": {
"clusters": [
@mccv
mccv / .bashrc
Created September 21, 2017 05:46
Emoji PS1
git_branch='`git rev-parse --abbrev-ref HEAD 2> /dev/null | sed s/^/\ \|\ /`'
emojis=(🐶 🐺 🐱 🐭 🐹 🐰 🐸 🐯 🐨 🐻 🐷 🐮 🐵 🐼 🐧 🐍 🐢 🐙 🐠 🐳 🐬 🐥)
emoji='`echo ${emojis[$RANDOM % 22]}`'
PS1="\[\033[0;36m\]\T | \W$git_branch | $emoji > \[\e[0m\]"
@mccv
mccv / config.yaml
Last active September 13, 2017 21:31
CircleCI config sample (part 3)
# note: the docker image versions here are almost certainly out of date.
# See https://github.com/turbinelabs/circle-ci-integration/blob/master/.circleci/config.yml
deploy-dev-server:
docker:
- image: turbinelabs/gcloud-build:0.12.0
steps:
- checkout
- run: openrc boot
- run: ./deploy.sh dev server/dev-deploy-template.yaml
@mccv
mccv / config.yaml
Last active September 13, 2017 21:32
CirceCI config sample (part 2)
# note: the docker image versions here are almost certainly out of date.
# See https://github.com/turbinelabs/circle-ci-integration/blob/master/.circleci/config.yml
push-dev-server:
docker:
- image: turbinelabs/gcloud-build:0.12.0
environment:
DEBIAN_FRONTEND: noninteractive
steps:
- checkout
- setup_remote_docker
@mccv
mccv / config.yaml
Last active September 13, 2017 21:32
CircleCI config sample (Part 1)
# note: the docker image versions here are almost certainly out of date.
# See https://github.com/turbinelabs/circle-ci-integration/blob/master/.circleci/config.yml
jobs:
build:
docker:
- image: node:8.4.0
environment:
DEBIAN_FRONTEND: noninteractive
steps:
- checkout
@mccv
mccv / gist:28caff90d20f8bda8156
Created September 16, 2014 19:50
Real___Facts Twitter accounts
➜ Downloads while read line; do curl -sL -w "%{http_code} %{url_effective}\n" "https://twitter.com/real${line}facts" -o /dev/null; done < usernames | grep 200
200 https://twitter.com/realAfacts
200 https://twitter.com/realafacts
200 https://twitter.com/realAcaciafacts
200 https://twitter.com/realactorfacts
200 https://twitter.com/realactualfacts
200 https://twitter.com/realalmondfacts
200 https://twitter.com/realanimalfacts
200 https://twitter.com/realapplefacts
200 https://twitter.com/realArabicfacts
@mccv
mccv / git-dumdum
Created April 11, 2014 19:06
git-dumdum
#!/usr/bin/env ruby
files = `find . -name .git -prune -o -size +10000`
files.each do |file|
cmd = "git ls-files #{file.strip} --error-unmatch > /dev/null 2>&1"
if system(cmd)
puts `du -sh #{file}`
end
end
@mccv
mccv / gist:9260811
Last active August 29, 2015 13:56
Burrito Reinheitsgebot

A burrito is composed of the following

  • Tortilla
  • Rice
  • Beans
  • Meat
  • Cheese
  • Salsa
  • Guacamole
  • Sour Cream
  • Onions
@mccv
mccv / gist:9164155
Created February 22, 2014 23:37
Cocks
➜ Documents grep cock /usr/share/dict/words
acock
acockbill
Babcock
bawcock
bibcock
bidcock
bilcock
billycock
blackcock