Skip to content

Instantly share code, notes, and snippets.

View rafaelsales's full-sized avatar
💻
Compiling...

Rafael Sales rafaelsales

💻
Compiling...
View GitHub Profile
@rafaelsales
rafaelsales / new_gist_file
Created November 1, 2013 17:15
Jenkins retest this please
Jenkins retest this please
@rafaelsales
rafaelsales / id_rsa.pub
Created October 30, 2013 22:01
My Public Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBmH6hVyGPPyQ4E7YtrBPWfhGlvNQs1lzBsQRi4L1U2VoaH+/jO4YipCT7vEFh6TH9RUsobQTjrTHhDdRqXDj3s1c9ZEV5OE6rE4PYEIYFcZFZJz0NZfvHMicKePJ0rrgjRVpCyaoxSdYHikQxcyLfFvyvv/cf6UYc9NvC6nUYqXcnmauEsduYVL7KGX6ba49cIbXfi+zkBverdlWaDV3yADFlaM0PGzVsEZglAiLFNg3nsNP61vVXB9UlxnQfl6s/bVfs+LlHWi2QjHZwMjE5HEyX8xhmPAtnczfwpKV8zxWmF+dhYQJwkffWeYPGvXd+tV5oIc2vwJPaJ57KoXUb sales@desktop
@rafaelsales
rafaelsales / gist:5518618
Created May 4, 2013 20:21
Replaces 'identifier' by 'code' in files containing 'identifier'
ack -l identifier | xargs -L1 sed -i '' "s/identifier/code/g"
@rafaelsales
rafaelsales / proxylocal_initializer.rb
Last active December 15, 2015 01:19
Create local proxy server associated with public url whenever starting rails server in development mode. It uses proxylocal.com service and gem to generate the public url.
# This initializer creates a local proxy server that makes the local web server accessible
# via a public host generated by ProxyLocal service - http://www.proxylocal.com
Rails.application.config.after_initialize do
server_running = defined?(WEBrick) || defined?(Rails::Server) || defined?(PhusionPassenger) ? true : false
next unless Rails.env.development? && server_running
Thread.new do
ProxyLocal::Client.run({
server_host: 'proxylocal.com',
@rafaelsales
rafaelsales / ssh config file for Amazon EC2
Created January 12, 2013 22:01
Easier SSH-ing to Amazon EC2 instances. With this example, you can just do $ ssh my-webserver
Host my-webserver
HostName ec2-##-###-##-##.location-east-1.compute.amazonaws.com
User ec2-user
IdentityFile /path_to/private_key.pem
@rafaelsales
rafaelsales / jQueryfy_for_Tampermonkey
Created December 15, 2012 15:22
jQueryfy is a Tampermonkey <http://goo.gl/19Fxy> script for enabling jQuery in any page dynamically. The script is published at http://userscripts.org/scripts/show/154225 where you can easily install in your Tampermonkey. Whenever the script is active, the jQuery is loaded after the page loads. If the page has already defined jQuery, it's not lo…
// ==UserScript==
// @name jQueryfy
// @namespace http://rafasales.com
// @version 0.1
// @description Loads jQuery in any page
// @match http*://*
// @copyright 2012+, Rafael Sales
// ==/UserScript==
if (typeof(unsafeWindow.jQuery) != 'undefined') {
return;