Skip to content

Instantly share code, notes, and snippets.

View mbbroberg's full-sized avatar
:octocat:
Mostly in enterprise github lately

Matthew Broberg mbbroberg

:octocat:
Mostly in enterprise github lately
View GitHub Profile
mjbrender:vagrant-gswd mjbrender$ vagrant status
Current machine states:
default not created (virtualbox)
The environment has not yet been created. Run `vagrant up` to
create the environment. If a machine is not created, only the
default provider will be shown. So if a provider is not listed,
then the machine is not created for that environment.
mjbrender:vagrant-gswd mjbrender$
@mbbroberg
mbbroberg / Vagrantfile
Created September 3, 2014 01:06
Vagrantfile for Taste Test (DevOps book)
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu-14.04"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
config.hostmanager.enabled = true
config.vm.define "puppy" do |puppy|
@mbbroberg
mbbroberg / gist:af32f8dff5fc59bba87a
Created December 22, 2014 15:19
Fun bash prompts
## Color green if last command successful, red otherwise
PS1="\[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`:\w\n\$
Explore more here:
http://www.reddit.com/r/programming/comments/697cu/bash_users_what_do_you_have_for_your_ps1/
@mbbroberg
mbbroberg / recap-1-12-15
Last active August 29, 2015 14:13
Riak Recap scratchpad
Good morning, afternoon and evening everyone.
I'm Matt Brender, new to Basho and focused on efforts out here in the open source portion of the Riak world. Tyler Hannan recommended that the very first task I take on is bringing back the Recap and Mark confirmed it was valuable to others. I hope you enjoy it.
# State of the Union
Since we haven't had one of these in a while, here is an update on the latest software we have available.
* Riak is at [2.0.4](http://docs.basho.com/riak/latest/) with [1.4.12](http://docs.basho.com/riak/1.4.12/) available as well
javascript: {
function replaceTokens(e, t) {
var n = e;
for (var r in t) {
n = n.replace(RegExp("[$]" + r, "g"), t[r])
}
return n
}
@mbbroberg
mbbroberg / keybase.md
Created March 22, 2015 15:36
keybase

Keybase proof

I hereby claim:

  • I am mjbrender on github.
  • I am mjbrender (https://keybase.io/mjbrender) on keybase.
  • I have a public key whose fingerprint is E6DA 92B1 C727 E0BC AE15 3B72 FA08 07CD 460E D1B5

To claim this, I am signing this object:

@mbbroberg
mbbroberg / Conclusion of thread
Created March 27, 2015 15:10
Fwd: Query on Riak Search in a cluster of 3 nodes behind ELB is giving different result everytime
Hey Santi, Baskar,
Are you noticing increased CPU load as you create more and more indexes? Running `riak-admin top -interval 2` a few times may bring sometime to light.
I’d see how you could increase resources or think more critically on how you’re indexing data for Solr. Does the data share most fields? Can you reuse indexes for some of the data and filter certain queries?
You may also wanted to look at this thread, https://groups.google.com/forum/#!topic/nosql-databases/9ECQpVS0QjE, which discusses modeling Riak Search data and the issues you’ll have with the overhead with gossiping so much metadata and the what Solr can handle.
Zeeshan Lakhani
programmer |
@mbbroberg
mbbroberg / hello-world
Last active August 29, 2015 14:23
Riak "Hello World!"
# Note: I'm running the Riak.app on OS X.
$ curl http://127.0.0.1:8098/ping
OK
$ curl -XPUT \
-H "Content-Type: text/plain" \
-d "Hello World\!" \
http://localhost:8098/types/default/buckets/helloworld/keys/devsfirstxput
$
$ curl http://localhost:8098/types/default/buckets/helloworld/keys/devsfirstxput
Hello World!
@mbbroberg
mbbroberg / Vagrantfile
Created July 17, 2015 17:02
Vagrantfile for Zombie Riak app
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@mbbroberg
mbbroberg / zombies.sh
Created July 17, 2015 17:10
Getting Zombies up and running on Vagrant
#!/usr/bin/env bash
echo "Installing pre-reqs"
echo -e "\n\n+++ Installing pre-reqs +++" >> provision.log
apt-get -y update >> ../provision.log 2>&1
apt-get -y install curl >> ../provision.log 2>&1
apt-get -y install ruby1.9.3 >> ../provision.log 2>&1
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 >> ../provision.log 2>&1
curl -L https://get.rvm.io | bash -s stable
rvm install ruby-1.9.3 >> ../provision.log 2>&1