Skip to content

Instantly share code, notes, and snippets.

View Sjeanpierre's full-sized avatar
💭
🤷🏿‍♂️

Stevenson Jean-Pierre Sjeanpierre

💭
🤷🏿‍♂️
View GitHub Profile
@ejlp12
ejlp12 / 1_ecs_note.md
Last active May 5, 2024 18:51
ECS Best Practices Notes
@Sjeanpierre
Sjeanpierre / db_connect.sh
Created June 15, 2015 19:04
Connect to database defined by rails databae.yml when on a server
#! /usr/bin/env bash
USERNAME=`cat config/database.yml | grep username | awk {'print$2'}`
PASSWORD=`cat config/database.yml | grep password | awk {'print$2'}`
HOST=`cat config/database.yml | grep host | awk {'print$2'}`
DATABASE=`cat config/database.yml | grep database | awk {'print$2'}`
mysql -h $HOST -u $USERNAME -D $DATABASE -p$PASSWORD
@acolyer
acolyer / service-checklist.md
Last active January 30, 2024 17:39
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
require 'sinatra'
require 'multi_json'
class App < Sinatra::Application
configure do
# Don't log them. We'll do that ourself
set :dump_errors, false
# Don't capture any errors. Throw them up the stack
set :raise_errors, true
@xaviershay
xaviershay / rewrite.rb
Created January 10, 2013 06:11
Proof-of-concept squid proxy settings for proxying http://rubygems.org/ Tested on one project on my local machine both cold, and warm with internet turned off.
#!/usr/bin/env ruby
# url rewriter for rubygems squid proxy
STDOUT.sync = true
while line = gets
url = line.split(' ')[0]
# Cargo-culted this conditional, not sure if it is necessary
response = if url