Skip to content

Instantly share code, notes, and snippets.

@ryansmith3136
ryansmith3136 / shusud-install.md
Created August 30, 2012 20:57
Shushud Installation
$ git clone https://github.com/shushu/shushud
$ cd shushud
$ heroku create my-shushud
$ git push heroku master
@ryansmith3136
ryansmith3136 / ruby-at-heroku.md
Created October 16, 2012 16:48
Ruby At Heroku

Ruby At Heroku

Where We Use Ruby

  • Web API
  • HTTP API
  • Dyno Management
  • Dynos

Where We Use Something Else:

@ryansmith3136
ryansmith3136 / lock.sh
Last active October 11, 2015 22:27
Locking using LOCKFILE(1)
export t=$(date +%s)
lockfile $t #create lock. Try running `lockfile $t` in another shell.
rm -f $t #delete lock
@ryansmith3136
ryansmith3136 / proposal.md
Created October 23, 2012 04:12
l2met log conventions proposal

Beta Features

  • Log Convetnions
  • Last Value Computation

This beta convention is running in production today. Start using it immediately.

Log Conventions

Counter

@ryansmith3136
ryansmith3136 / health.rb
Created October 30, 2012 18:59
Middleware to respond to HTTP HEAD /
# Add this file to /lib/health.rb
# Require in config/application.rb
# require File.join(File.dirname(__FILE__), '../lib/health.rb')
# Load in config/application.rb
# config.middleware.use Heroku::HttpHealth
# Be sure to put this middleware at the front of all other middlewares. Don't want authentication on this guy.
class Heroku::HttpHealth
def initialize(app)
@app = app
@ryansmith3136
ryansmith3136 / joyent.md
Created November 3, 2012 03:30
Joyent Notes
  • Signup process was thorough but complete.
  • Can ssh into my new server in less than a minute.
  • They have a lot of custom terminology and no single page to define it. E.g. What is the difference between a virtual machine and a smart machine?
loop do
$stdout.puts("at=begin")
sleep(5)
$stdout.puts("at=end")
end
@ryansmith3136
ryansmith3136 / mem-lower-bound.md
Created November 27, 2012 16:06
Memory Lower Bound: Go vs. C

Have you ever wondered about the least amount of memory a C or Go program will use on a 64bit Linux machine? Kr & I have, here is the results of our curiosity:

A simple C program:

void
main()
{
  for (;;) {
 }
@ryansmith3136
ryansmith3136 / service-visibility.md
Created December 14, 2012 22:36
Defining service visibility

Service Visibility

The purpose of service visibility is to reconcile the execution of software with the agreement between the provider & customer of the service. Thus, the service must have customers who are aware that they are in fact customers of the service and furthermore are aware of the expected level of performance. In the case of an e-commerce site, the customers of the service are the visitors to the site and the agreed level of service is such that the customer views pages at some small epsilon + the speed of light. The service level agreement is arbitrary and can be estimated by the service provider. (e.g. 100ms)

Service providers need tools to help reconcile each customer's interaction with the service to understand if there are any breaches in agreement. When the agreement is breached, visibility tooling should provide help in debugging the violating component that lead to the breach. Surfacing information to service operators with the least amount of paing is a challenge accepted by makers