Skip to content

Instantly share code, notes, and snippets.


Eric Redmond coderoshi

View GitHub Profile
View gist:e8b1ff86d8e399f62309a9efa9f03d3c
Verifying my Blockstack ID is secured with the address 1r2LNQFgRi9V8jT7aNFdyis4bZDBnmZ7k
View dds.rb
# encoding: UTF-8
require 'riak'
require 'rsolr'
require 'ap'
client = [{pb_port:10017}])
people = client.bucket('people')
map =, 'eric', 'maps')
map.registers['first'] = 'MY_NAME'
## Set SC from off to on
find /riak/dev -name riak.conf | xargs sed -i -e "s/## strong_consistency = on/strong_consistency = on/"
## restart each node in order
for d in `ls /riak/dev`; do /riak/dev/$d/bin/riak restart; done
coderoshi / get_all.js
Created Dec 6, 2012
Riak Javascript Client Usage
View get_all.js
db.getAll('90s-emo', {
where: { origin: "Madison, WI" }
coderoshi / get_object.rb
Created Dec 6, 2012
Riak Ruby Client Usage
View get_object.rb
coderoshi / gist:3729593
Last active Mar 31, 2022
A Very Short Guide to Writing Guides
View gist:3729593

A Very Short Guide to Writing Guides

This is just a few thoughts on the topic of writing technical guides. This was intended for Basho's engineering team, but this may apply to open source projects in general.


It's commonly preached that the first step in writing is to identify your audience; to whom are you writing? This is the most well known, most repeated, and most overlooked step of writing in general and technical writing in particular. Take this document, for example. My audience is technical people who need to communicate technical information, and not teenagers, so I shy away from images of pop icons and memes. I use jargon and words like "identify" rather than "peep this".


coderoshi / config.rb
Created Aug 21, 2012
Register FML in Middleman
View config.rb
# Register the FML plugin to middleman
module Middleman::Renderers::FAQML
def registered(app)
require "faqml"
app.before_configuration { template_extensions :fml => :html }
:buffer => '@_out_buf',
:generator => ::Temple::Generators::StringBuffer
coderoshi / Gemfile
Created May 24, 2012
A Sinatra example to turn any site into a JSON service
View Gemfile
source :rubygems
gem 'sinatra'
gem 'httparty'
gem 'nokogiri'
coderoshi /
Created May 24, 2012
Ca$hcat Hubot plugin
# Cashcatme. Just like pug bombing, but with flava
# cashcat me - Receive a cashcat
# cashcat bomb N - get N cashcats
module.exports = (robot) ->
robot.respond /cashcat me/i, (msg) ->
.get() (err, res, body) ->
msg.send JSON.parse(body).cats
coderoshi /
Created May 18, 2012
Challonge Hubot plugin
# Usage: (bracket followed by a comma-separated list of names)
# hubot bracket Joe, Fred, Tony, Eddy
https = require('https')
# uses challonge to create a bracket with the given names
module.exports = (robot) ->
robot.respond /bracket\s+(.+?)$/i, (msg) ->
names = msg.match[1]
return unless names