Skip to content

Instantly share code, notes, and snippets.

View odarriba's full-sized avatar
🚀

Óscar de Arriba odarriba

🚀
View GitHub Profile
@agarie
agarie / gist:4753170
Created February 11, 2013 07:54
Installing ruby-opencv on OS X.
# Use Homebrew and be happy.
brew update
brew install opencv
# Give the correct pathnames. Of course, `2.4.3` is the current version at this time, change it accordingly.
gem install ruby-opencv -- --with-opencv-lib=/usr/local/Cellar/opencv/2.4.3/lib \
--with-opencv-include=/usr/local/Cellar/opencv/2.4.3/include/opencv \
--with-opencv-include=/usr/local/Cellar/opencv/2.4.3/include/opencv2
@mrichie
mrichie / gist:4043266
Created November 9, 2012 02:05 — forked from jfirebaugh/gist:4007524
Installing Ruby 2.0.0-preview1 with RVM on OS X
# First, make sure that you have the most recent rvm. Several bugs with 2.0.0-preview1
# have recently been fixed.
#
# Second, the openssl that comes with MacOS is too old for Ruby 2.0. You need to install
# a newer one with homebrew or the rvm pkg command.
# Option 1, with homebrew openssl:
brew update
brew install openssl
@L-A
L-A / moonobject.js
Created August 28, 2012 13:20
Moon phase calculation
var MoonInfo = function(day, month, year) {
var n0 = parseInt( "0" );
var f0 = parseFloat( "0.0" );
var AG = f0; // Moon's age
var DI = f0; // Moon's distance in earth radii
var LA = f0; // Moon's ecliptic latitude
var LO = f0; // Moon's ecliptic longitude
var Phase = " ";
var Zodiac = " ";
@zenkay
zenkay / gist:3237860
Created August 2, 2012 15:19
Installation tips for RVM/Ruby on OSX 10.8 Mountain Lion

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around

@alialo
alialo / _config.yml
Created March 30, 2012 21:45
Twitter Bootstrap style pagination in Jekyll
paginate: 10
@ravasthi
ravasthi / _config.yml
Created February 15, 2012 08:59
Multiple authors on Jekyll
authors:
hanzou:
name: Hanzou Hattori
display_name: Hanzou
gravatar: c66919cb194f96c696c1da0c47354a6a
email: hanzou@company.com
web: http://company.com
twitter: company
github: hhattori
jorgen:
@tjh
tjh / character_set_and_collation.rb
Created January 31, 2012 16:07
Convert all Rails table column collation and character set
#!/usr/bin/env ruby
# Put this file in the root of your Rails project,
# then run it to output the SQL needed to change all
# your tables and columns to the same character set
# and collation.
#
# > ruby character_set_and_collation.rb
DATABASE = ''