Skip to content

Instantly share code, notes, and snippets.

View rorra's full-sized avatar

Rodrigo Dominguez rorra

View GitHub Profile
@rorra
rorra / sitemap_generator.rb
Created January 28, 2012 10:19
sitemap_generator and s3 with paperclip and aws-s3
require 'aws'
class Rake::Task
def replace &block
@actions.clear
prerequisites.clear
enhance &block
end
end
@rorra
rorra / gist:5106512
Created March 7, 2013 08:43
Ruby network connection debug
module Net
class HTTP
alias_method '__initialize__', 'initialize'
def initialize(*args,&block)
__initialize__(*args, &block)
ensure
@debug_output = $stderr ### if ENV['HTTP_DEBUG']
end
end
@rorra
rorra / gist:5216306
Created March 21, 2013 20:15
S3 Random Issue
ENV["RACK_ENV"] ||= 'development'
EM.run do
connection = AMQP.connect(:host => '127.0.0.1')
puts "Connected to RabbitMQ. Running #{AMQP::VERSION} version of the gem..."
@@s3 = UberS3.new(
{ access_key: 'XXX',
secret_access_key: 'XXX',
bucket: "my-project-#{ENV['RACK_ENV']}",
@rorra
rorra / .emacs
Last active August 29, 2015 14:14
emacs for erlang course
;; Add MELPA to package sources
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
;; Set my email address.
(setq user-mail-address "[email protected]")
;; Set the shell emacs uses.
gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/local/Cellar/libxml2/2.9.4/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.4/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28_1 --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib
@rorra
rorra / .emacs
Last active May 23, 2022 04:17
.emacs
;; Install these packages
;; use-package
;; alchemist
;; all-the-icons
;; all-the-icons-dired
;; avy
;; dimmer
;; diminish
;; doom-themes
;; doom-modeline