Skip to content

Instantly share code, notes, and snippets.

View marlonglopes's full-sized avatar
🏠
Working from home

Marlon Gomes Lopes marlonglopes

🏠
Working from home
View GitHub Profile

AWS query-instance_method docs

export AWS_ACCESS_KEY_ID=‘XXXX’
export AWS_SECRET_ACCESS_KEY=‘XXXX’
# ENV['AWS_ACCESS_KEY_ID']
# ENV['AWS_SECRET_ACCESS_KEY']

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

require 'webrick'
server = WEBrick::HTTPServer.new :Port => 8000
server.mount_proc '/' do |req, res|
puts req.inspect
res.body = nil
end
trap 'INT' do server.shutdown end
@marlonglopes
marlonglopes / Cide bagual
Created January 17, 2011 18:14
C++ quick sort bagual
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
source 'http://rubygems.org'
gem 'rails', '3.0.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
platforms :jruby do
gem 'activerecord-jdbc-adapter', :require => false
gem 'activerecord-jdbcmysql-adapter', :require => false