Skip to content

Instantly share code, notes, and snippets.

@jpetazzo
jpetazzo / Dockerfile
Created September 26, 2013 22:06
Ansible-in-Dockerfile
FROM ubuntu
RUN sed -i 's/main/main universe multiverse/' /etc/apt/sources.list
RUN apt-get update -q
RUN apt-get install -qy build-essential python-dev python-pip curl
#RUN apt-get install -qy autoconf
RUN pip install ansible
RUN mkdir -p /etc/ansible
RUN curl -L https://github.com/gc3-uzh-ch/ansible-playbooks/archive/cloud.tar.gz | tar -zxf-
RUN /bin/echo -e "[slurm_master]\nlocalhost" > /etc/ansible/hosts
RUN cp /bin/true /bin/hostname
# A program that works jobs in newly created UNIX
# process by calling fork. The number of processes
# running at any given time is bounded by our use
# of a sized queue.
require 'thread'
# Run at most 4 UNIX processes for any given time.
@limiter = SizedQueue.new(4)

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@ryandotsmith
ryandotsmith / process-partitioning.md
Created April 13, 2012 06:40
Process Partitioning

Process Partitioning

The Problem

When working with large, high volume, low latency systems, it is often the case that processing data sequentially becomes detrimental to the system's health. If we only allow 1 process to work on our data we run into several challenges:

  • Our process may fall behind resulting in a situation which it is impossible for our process to catch up.
  • Our singleton process could crash and leave our system in a degraded state.
  • The average latency of data processing could be dramatically affected by outlying cases.
@ezkl
ezkl / faraday_typh_default.rb
Created April 1, 2012 07:26
Parallel Requests w/ Faraday + Typhoeus
require "faraday"
require 'typhoeus'
conn = Faraday.new(:url => 'http://httpstat.us') do |builder|
builder.request :url_encoded
builder.response :logger
builder.adapter :typhoeus
end
conn.in_parallel do

Adrian -

I appreciate that you spent time in writing this post. I know I've been up until 2am writing similarly long ones as well. I will take responsibility for having what is likely an irrational response (I blame Twitter for that) to the term "NoOps", but I invite you to investigate why that might be. I'm certainly not the only one who feels this way, apparently, and thus far have decided this issue is easily the largest distraction in my field I've encountered in recent years. I have had the option to simply ignore my opposition to the term, and just let the chips fall where they may with how popular the term "NoOps" may or may not get. I have obviously not taken that option in the past, but I plan to in the future.

You're not an analyst saying "NoOps". Analysts are easy (for me) to ignore, because they're not practitioners. We have expectations of engineering maturity from practitioners in this field of web engineering, especially those we consider leaders. I don't have any expectations from analysts,

@v1nc3ntlaw
v1nc3ntlaw / rbenv-install-system-wide.sh
Last active July 26, 2022 01:08
rbenv install ruby 1.9.3-p448 on Debian 6 Squeeze
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
@gorsuch
gorsuch / gist:1418850
Created December 1, 2011 18:37
clojure uuid
(defn uuid [] (str (java.util.UUID/randomUUID)))
@juno
juno / README.md
Created November 1, 2011 08:40
Install rbenv and ruby-build to Amazon Linux (cloud-init).

Install rbenv and ruby-build to Amazon Linux (cloud-init).

  1. Copy & paste content of user-data.sh to EC2 RunInstances user-data
  2. Then, logging in to EC2 instance as ec2-user and run install-ruby.sh.
@mikehale
mikehale / create_server.rb
Created September 28, 2011 17:15
Provision a Ubuntu 10.04 LTS (lucid) 256 server on Rackspace CloudServers with ssh password logins disabled
#!/usr/bin/env ruby
# This script provisions a Ubuntu 10.04 LTS (lucid) 256 server on
# Rackspace CloudServers with ssh password logins disabled and only
# the
# public key at ~/.ssh/id_rsa.pub authorized to login. The server will
# be terminated after 60 seconds. You need a CloudServers username and
# api_key to test this script.
require 'rubygems'