Skip to content

Instantly share code, notes, and snippets.

View delano's full-sized avatar
👋
Let's talk about building teams

Delano delano

👋
Let's talk about building teams
View GitHub Profile
@delano
delano / docker-compose.yml
Created December 2, 2022 07:23 — forked from drzero42/docker-compose.yml
Postgres logical replication breakage
version: "3"
services:
master:
image: postgres:11
environment:
POSTGRES_PASSWORD: abc123
command: -c config_file=/etc/postgresql/postgresql.conf
volumes:
- ./postgresql.conf:/etc/postgresql/postgresql.conf
@delano
delano / README
Last active October 26, 2022 23:26 — forked from jdowning/ami-clean.sh
Script to clean up Ubuntu EC2 instance before packaging as an AMI
See: https://gist.githubusercontent.com/delano/4eee6bcfce0b6e3c83f1e98d9cd7af16
# = Rudy -- Skeleton configuration
#
# Rudy automatically looks for configuration files in the following
# locations (in this order):
#
# ./.rudy/config
# ~/.rudy/config
#
# ./Rudyfile
# ./machines.rb, ./routines.rb, ./commands.rb
@delano
delano / cltools.sh
Created June 15, 2016 22:51 — forked from jellybeansoup/cltools.sh
Install Autoconf and Automake on OS X Mountain Lion
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build

Keybase proof

I hereby claim:

  • I am delano on github.
  • I am delano (https://keybase.io/delano) on keybase.
  • I have a public key whose fingerprint is DAE4 DF31 4618 B56C 98C3 CBDF AE63 BC48 9CC3 BC2E

To claim this, I am signing this object:

@delano
delano / Distraction Free.sublime-settings
Created December 17, 2012 01:34
SublimeText2 Preferences
{
"line_numbers": true,
"gutter": true,
"draw_centered": false,
"wrap_width": 0,
"word_wrap": false,
"scroll_past_end": true
}
@delano
delano / gist:845643
Created February 26, 2011 21:29
Fix for "Errno::ETIMEDOUT: Operation timed out - connect(2)" when installing gems
# A DNS change to Rubygems.org is causing lingering issues. Namely,
# rubygems.org and production.s3.rubygems.org are still pointing to
# the old address. See:
# http://twitter.com/#!/gemcutter/status/30666857698557952
# The symptoms:
# $ gem install benelux --version 0.5.17
# ERROR: Could not find a valid gem 'benelux' (= 0.5.17) in any repository
# ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
@delano
delano / gist:837654
Created February 21, 2011 20:22
thbll.com integration in Ruby
class TheBell
include HTTParty
#debug_output $stdout
base_uri 'http://api.thbll.com/ring-the-bell/SITENAME'
def self.ring
post("/PASSPHRASE/", :body => {})
end
end
#
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#
# Power law (log tail) distribution
# Copyright(C) 2010 Salvatore Sanfilippo
# this code is under the public domain
# min and max are both inclusive
# n is the distribution power: the higher, the more biased
def powerlaw(min,max,n)
max += 1
pl = ((max**(n+1) - min**(n+1))*rand() + min**(n+1))**(1.0/(n+1))
max-1-pl.to_i