Skip to content

Instantly share code, notes, and snippets.

Old versions of brew packages

Easy mode

Downgrading a brew package can sometimes be super easy with:

brew switch <package> <version>

Keybase proof

I hereby claim:

  • I am eirc on github.
  • I am eirc (https://keybase.io/eirc) on keybase.
  • I have a public key ASA_MPAEC9UspX_eQC7xK9MudwyMpBjSAm5aMOtVoYYiMAo

To claim this, I am signing this object:

#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
sudo aptitude install -y build-essential libtool automake autoconf libcurl4-gnutls-dev check libevent-dev libmemcached-dev memcached
git clone https://github.com/couchbase/libconflate.git
cd libconflate
git checkout 2.1.1r
@eirc
eirc / eclipses.rb
Created May 1, 2014 12:28
Calculate coverage percentage of solar eclipses by moons on their respective planets
#!/usr/bin/env ruby
# Solar eclipses on the earth by the moon have the peculiar characteristic of the moon having about the same apparent
# size as the sun in the sky thus obscuring it exactly. Does this happen on other planets too? This script queries
# the Wolfram Alpha engine for this information for every planet and moon. Run it to find out!
#
# For a really scientific approach check out this paper: http://astrogeo.oxfordjournals.org/content/40/3/3.18.short
#
# Instructions:
#
@eirc
eirc / xbmc-webinterface-keyboard-shortcuts.js
Created March 10, 2013 17:02
XBMC webinterface keyboard shortcuts
$(document).keydown(function(e) {
switch(e.which) {
case 37:
$('#remoteContainer').find('#left').click();
break;
case 38:
$('#remoteContainer').find('#up').click();
break;
case 39:
$('#remoteContainer').find('#right').click();
@eirc
eirc / sprites.html
Created December 10, 2012 14:36
Sprite example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<style type="text/css">
.google-sprite {
background: url(https://www.google.gr/images/nav_logo114.png) no-repeat;
display: inline-block;
vertical-align: middle;
# Rack middleware that drops non properly encoded cookies that would hurt the ActionDispatch::Cookies middleware.
#
# This is actually a hotfix for issues
# * https://github.com/rack/rack/issues/225
# * https://github.com/rails/rails/issues/2622
module CleanCookies
# Tests whether a string may be decoded as a form component
def decodable?(string)
URI.decode_www_form_component(string)
true
@eirc
eirc / .rvmrc
Created October 20, 2011 07:53 — forked from jimeh/decode.rb
Ruby-based Benchmark of MessagePack vs. JSON vs. Yajl vs. Protobuffers vs. MultiJson vs. Marshal vs. YAML vs. BSON
rvm --create ree@benchmarks