Skip to content

Instantly share code, notes, and snippets.

View wbotelhos's full-sized avatar
💭
I'm not my code.

Washington Botelho wbotelhos

💭
I'm not my code.
View GitHub Profile
@wbotelhos
wbotelhos / maker.label.js
Created June 5, 2013 02:51
Maker With Label
Maps.prototype.label = function(marker, index) {
var label = new Label({ map: this.map });
label.set('zIndex', index);
label.set('text', '12');
label.bindTo('position', marker, 'position');
};
Label.prototype = new google.maps.OverlayView;
/**
* @name InfoBox
* @version 1.1.11 [January 9, 2012]
* @author Gary Little (inspired by proof-of-concept code from Pamela Fox of Google)
* @copyright Copyright 2010 Gary Little [gary at luxcentral.com]
* @fileoverview InfoBox extends the Google Maps JavaScript API V3 <tt>OverlayView</tt> class.
* <p>
* An InfoBox behaves like a <tt>google.maps.InfoWindow</tt>, but it supports several
* additional properties for advanced styling. An InfoBox can also be used as a map label.
* <p>
@wbotelhos
wbotelhos / omniauth.rb
Last active December 16, 2015 11:19
SSL certificate fix (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed)
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if Rails.env.development?
@wbotelhos
wbotelhos / quiet_assets.rb
Created April 15, 2013 18:23
Supress the assets log
if Rails.env.development?
Rails.application.assets.logger = Logger.new('/dev/null')
Rails::Rack::Logger.class_eval do
def call_with_quiet_assets(env)
previous_level = Rails.logger.level
Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/}
call_without_quiet_assets env
@wbotelhos
wbotelhos / curb_install.sh
Created March 5, 2013 21:48
Error installing curb (Ubuntu)
# ERROR: Error installing curb:
# ERROR: Failed to build gem native extension.
sudo apt-get install libcurl4-openssl-dev
gem install curb
# cucumber.rb
AppName::Application.configure do
config.assets.debug = false
end
# bash
rails s | grep -v 'Started GET /assets/'
@wbotelhos
wbotelhos / git_delete_tag.sh
Created February 13, 2013 19:43
Delete Remote Git Tag
git tag -d 1.0.0
git push origin :refs/tags/1.0.0
@wbotelhos
wbotelhos / growlnotify_unistall.sh
Created January 4, 2013 01:46
Removing growlnotify
rm -rf /usr/local/bin/growlnotify
rm -rf /usr/local/share/man/man1/growlnotify.1
@wbotelhos
wbotelhos / gist:4125292
Created November 21, 2012 15:04
Check Python Library Info
import pkg_resources
env = pkg_resources.Environment()
env['lib_name'][0].version
@wbotelhos
wbotelhos / gist:4120538
Created November 20, 2012 19:45
Blocking IP via Iptables
iptables -I INPUT -s x.p.t.o -j DROP