Skip to content

Instantly share code, notes, and snippets.

View wwest4's full-sized avatar
😘
Welcome to my home page! I kiss you!!!!!

Bill West wwest4

😘
Welcome to my home page! I kiss you!!!!!
View GitHub Profile
@wwest4
wwest4 / random-ted.sh
Created November 27, 2017 22:25
3 random TED talk links
for n in $(seq 1 $(curl -s "https://www.ted.com/talks/quick-list" | grep pagination | awk -F "</a>" '{print $5}' | sed '/^$/ d' | awk -F '>' '{print $NF}')); do curl -s "https://www.ted.com/talks/quick-list?page=${n}" | grep 480; done | gsort -R | head -3
diff --git a/Gemfile.lock b/Gemfile.lock
index 37e10ff..8e69f06 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- circactivator (2.0.1)
+ circactivator (2.1.0)

Keybase proof

I hereby claim:

  • I am wwest4 on github.
  • I am wwest4 (https://keybase.io/wwest4) on keybase.
  • I have a public key whose fingerprint is 7D10 3D6D 2E60 6F8D 6E5B 93EA AA4C 736A 2CC4 E9B0

To claim this, I am signing this object:

START parent=node(#{id})
MATCH (parent)-[:children*]->(i:`Instance`)
OPTIONAL MATCH (parent)-[:children*]->(i:`Instance`)-[]->(e:`Environment`)
WITH i, e
[WHERE e.name='foo' [[OR e.name='bar'] [OR e.name IS NULL]]] WITH i, e]
MATCH (i)
OPTIONAL MATCH (i)-[]-(h:`Host`)
WITH i, e, h
@wwest4
wwest4 / gist:269a4f6adc5aa76949fd
Created January 10, 2015 21:36
grains proof by induction

##Intution #####square 0 = n 1 grain 1 total (2^(n+1) - 1) holds

#####square 1 = n 2 grains 3 total (2^(n+1) - 1) holds

#####square 2 = n

@wwest4
wwest4 / git-credit
Last active August 29, 2015 14:06
originally from some SO article
#
# usage: git-credit author
#
function git-credit() {
git log --author="$1" --pretty=tformat: --numstat | \
awk ' \
{
net += $1 - $2
delta += $1 + $2
} \
@wwest4
wwest4 / Makefile
Created February 26, 2014 22:42
Collins FPM Makefile
NAME=collins
VERSION=1.2.3
ITERATION=1
SHA=c9fe4935882eb7ff0d3e945425151a3dc5d9c25ce1ea6ad4c29d5a2c54b1bc24
INSTALLDIR=/usr/local
USER=collins
.PHONY: clean
# TODO - get --directories working so that all dirs are owned by $(USER)
@wwest4
wwest4 / gist:8785260
Created February 3, 2014 14:56
collins_client Examples - Modify
#!/usr/bin/env ruby
require 'collins_client'
config = { username: 'blake',
password: 'admin:first',
host: 'http://localhost:9000'
}
# modifying a single asset can be done w/ convenience class
# Collins::AssetClient, which is returned by with_asset()
@wwest4
wwest4 / gist:8785248
Created February 3, 2014 14:55
collins_client Examples - Search
#!/usr/bin/env ruby
require 'collins_client'
config = { username: 'blake',
password: 'admin:first',
host: 'http://localhost:9000'
}
begin
client = Collins::Client.new config
@wwest4
wwest4 / gist:8785235
Created February 3, 2014 14:54
collins_client Examples - Populate DB
#!/usr/bin/env ruby
require 'collins_client'
config = { username: 'blake',
password: 'admin:first',
host: 'http://localhost:9000'
}
client = Collins::Client.new config