Skip to content

Instantly share code, notes, and snippets.

Eric Redmond coderoshi

Block or report user

Report or block coderoshi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:e8b1ff86d8e399f62309a9efa9f03d3c
Verifying my Blockstack ID is secured with the address 1r2LNQFgRi9V8jT7aNFdyis4bZDBnmZ7k https://explorer.blockstack.org/address/1r2LNQFgRi9V8jT7aNFdyis4bZDBnmZ7k
View dds.rb
# encoding: UTF-8
require 'riak'
require 'rsolr'
require 'ap'
client = Riak::Client.new(nodes: [{pb_port:10017}])
people = client.bucket('people')
map = Riak::Crdt::Map.new(people, 'eric', 'maps')
map.registers['first'] = 'MY_NAME'
View rolling_sc.sh
## 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
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
coderoshi / get_object.rb
Created Dec 6, 2012
Riak Ruby Client Usage
View get_object.rb
client['roflcopter']['key0']
@coderoshi
coderoshi / gist:3729593
Last active Jun 19, 2019
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.

Audience

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 teen girls, so I shy away from images of pop icons riding unicorns. I use jargon and words like "identify" rather than "peep this".

Pronouns

@coderoshi
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)
begin
require "faqml"
app.before_configuration { template_extensions :fml => :html }
::FAQML::Engine.set_default_options(
:buffer => '@_out_buf',
:generator => ::Temple::Generators::StringBuffer
)
@coderoshi
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
coderoshi / cashcat.coffee
Created May 24, 2012
Ca$hcat Hubot plugin
View cashcat.coffee
# 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) ->
msg.http("http://cashcatme.heroku.com/bomb?count=1")
.get() (err, res, body) ->
msg.send JSON.parse(body).cats
@coderoshi
coderoshi / bracket.coffee
Created May 18, 2012
Challonge Hubot plugin
View bracket.coffee
# 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
You can’t perform that action at this time.