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
@mbbroberg
mbbroberg / Email EMC Elect Confirmation
Last active December 28, 2015 00:49
For the EMC Elect nomination process, we want to automatically email potential members to get them to confirm. Based on the way the spreadsheet is designed, this works! I'm also using the hourly trigger to keep it updated: https://developers.google.com/apps-script/understanding_triggers
var NOMINATION_SHEET = 'EMC Elect Nomination Form';
var CONFIRMATION_SHEET = 'Confirmations All';
var EMAIL_SENT = "EMAIL_SENT";
var EMAIL = "EMAIL";
var DUPLICATE = "Yes";
var SUBJECT = "You've Been Nominated for EMC Elect 2014";
var MESSAGE = "<HTML><BODY>"
+ "<P>" + "Congratulations!"
@mbbroberg
mbbroberg / iterm2.textile
Last active February 21, 2017 07:05
A gathering of useful shortcuts for others new to iTerm2

iTerm2 – Useful Shortcuts (Mac OS X)

with a hat tip to Sublime Text 2 Shortcuts

The Awesome

⌘; autocomplete
⌘⌥B instant replay
⌘⌥E search across all tabs
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 / CURL emulation
Created September 3, 2014 19:47
Emulate curl with wget
# Emulate curl with wget
ARGS=$(echo "$*" | sed -e 's/--progress-bar /--progress=bar /' \
-e 's/-L //' \
-e 's/-I /--server-response /' \
-e 's/-s /-q /' \
-e 's/-o /-O /' \
-e 's/-C - /-c /')
wget $ARGS
@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 |