Skip to content

Instantly share code, notes, and snippets.

View tylerhannan's full-sized avatar

Tyler Hannan tylerhannan

View GitHub Profile

Keybase proof

I hereby claim:

  • I am tylerhannan on github.
  • I am tylerhannan (https://keybase.io/tylerhannan) on keybase.
  • I have a public key ASDaj003vCE9glud2NjQ0egqPjaZZU52kCisPxK3km2T4wo

To claim this, I am signing this object:

#!/usr/bin/env sh
# I've adapted this from the following, which was in turn adapted from the link
# below it:
# * https://raw.github.com/gist/2108403/hack.sh
# * https://github.com/mathiasbynens/dotfiles/blob/master/.osx
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
# defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
PID TTY TIME CMD
1 ?? 0:32.59 /sbin/launchd
42 ?? 0:02.98 /usr/libexec/UserEventAgent (System)
43 ?? 0:31.47 /usr/sbin/syslogd
45 ?? 0:02.61 /usr/libexec/kextd
46 ?? 0:24.98 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSE
50 ?? 0:00.25 /System/Library/CoreServices/appleeventsd --server
51 ?? 0:02.29 /usr/libexec/configd
52 ?? 0:03.51 /System/Library/CoreServices/powerd.bundle/powerd
57 ?? 0:05.06 /usr/libexec/airportd
@tylerhannan
tylerhannan / gist:6358724
Last active December 21, 2015 20:08
Test Gist
user_object = ruby_client['users'].get_or_new('thevegan3000')
user_object.indexes['user_group_bin'] << 'administrator'
user_object.store
admin_user_keys = ruby_client['users'].get_index('user_group_bin', 'administrator')
// Create a new bucket in Riak and enable `allow_mult`
$ curl -i http://localhost:8098/buckets/new_hotness/props \
-X PUT -d '{"props":{"allow_mult":true}}' -H "Content-Type: application/json"
// POST to the `counters` resource. In this example we're adding "1" to the "riak-counters-blog-post-views" counter
$ curl -i http://localhost:8098/buckets/new_hotness/counters/riak-counters-blog-post-views \
-X POST -d "1"
IF
(EXISTS
(SELECT 1 FROM syscat.tables WHERE tabschema = 'dbo' and tabname = 'gooddecisions'))
THEN
DROP TABLE dbo.gooddecisions;
END IF;
dcos riak --framework riakmf --cluster riak2 cluster create
dcos riak --framework riakmf --cluster riak2 cluster list #show available clusters
dcos riak --framework riakmf --cluster riak2 node add --nodes 3
dcos riak --framework riakmf node add --nodes 3 #add 3 more nodes to the cluster
dcos package install riak --options=docs-riak.json #install the Mesos Riak Framework
dcos riak --framework riakmf cluster create #create a namespace for the Riak nodes
docs riak --framework riakmf node add --nodes 3 #add 3 nodes to the cluster
riak-admin security alter-user admin password=riakmaster