Skip to content

Instantly share code, notes, and snippets.

View brndnblck's full-sized avatar
🎧

Brandon Black brndnblck

🎧
View GitHub Profile
@camertron
camertron / measure.rb
Created June 15, 2012 22:48
Measure the memory taken by a Ruby object (by Robert Klemme)
#!/bin/env ruby
# lazy hack from Robert Klemme
module Memory
# sizes are guessed, I was too lazy to look
# them up and then they are also platform
# dependent
REF_SIZE = 4 # ?
OBJ_OVERHEAD = 4 # ?
@prebenlm
prebenlm / .A how to display Irssi-hilights in OS X Notification Center.md
Last active September 20, 2024 16:55
Guide: how to make irc messages in a screen on a remote server appear in your Mac OS X Lion Notification Center with the help of terminal-notifier

Irssi in Mac OS X Notification Center

Mou icon

Overview

This guide will explain how you can make irc messages in a screen on a remote server appear in your Mac OS X Lion Notification Center with the help of terminal-notifier.

We will also explain how the process can be automatically started each time you log in to your Mac and ensure the connection to the server is kept alive.

@yanatan16
yanatan16 / .mongorc.js
Last active June 27, 2022 09:03
My .mongorc.js file
(function () {
rcversion = '1.0';
load('underscore.min.js')
// NOTES
// Basics, wrap the whole thing in a function
// Set a version for sanity's sake
// Load underscore, a must in any javascript environment
@ajdavis
ajdavis / RS client pseudocode
Last active December 22, 2015 20:49
Replica set client with multithreaded monitoring.
class Member
def init():
self.connecting = True
self.sleep_condition = condition variable
self.monitoring = True
self.up = False
start a thread that runs monitor()
def monitor()
while self.monitoring:
@headius
headius / 1. results
Last active April 27, 2016 19:43
mandelbrot performance across JRuby 9k modes
# interpreted AST
system ~/projects/jruby $ jruby.bash -X-C mandelbrot.rb 20
warming up
running mandelbrot(500) for 20 iterations
4.862
4.822
4.822
4.846
5.057
@chrisb
chrisb / gist:4d6a09c6cc1ca2e1b14e
Last active November 25, 2022 04:15
Homebrew, Ruby, and Rails on OS X 10.10

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)