Skip to content

Instantly share code, notes, and snippets.

View edelbalso's full-sized avatar

Eduardo Del Balso edelbalso

  • LendingHome
  • San Francisco
View GitHub Profile
require 'myclass'
traceable = MyClass.CreateTraceableObject()
class TraceableObject
def initialize(obj)
@obj = obj
end
def self.before_init(classname)
puts "-- s - #{classname}.initialize() ---"
end
@edelbalso
edelbalso / mailinator.rb
Created June 28, 2011 15:08
Cleaning your inbox, the ruby way.
#!/usr/bin/ruby
require 'rubygems'
require 'gmail'
def mailinate(label,emails, delete_email = false)
puts "#{label} [#{emails.count}]"
emails.each do |email|
puts " #{delete_email ? 'assasinating' : 'mailinating'} => [#{email.subject}]"
@edelbalso
edelbalso / gist:2150920
Created March 21, 2012 18:36
Rubymine color settings
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="Stellar - BigFont" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.1" />
<option name="EDITOR_FONT_SIZE" value="13" />
<option name="CONSOLE_LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_NAME" value="Anonymous Pro" />
<colors>
<option name="ANNOTATIONS_COLOR" value="3e83e7" />
<option name="CARET_COLOR" value="" />
<option name="CARET_ROW_COLOR" value="202226" />
@edelbalso
edelbalso / performance_metrics.md
Created July 9, 2012 23:41 — forked from uhhuhyeah/performance_metrics.md
Concepts used in browser-side performance testing

An Important Note

These are the metrics that would be used by the engineering team to evaluate effectiveness of front-end optimizations, and shouldn’t be communicated to stakeholders. Emily’s 90% page loaded metric is a way better model for measurable progress of “page load time”.

Outline

The purpose of this document is to outline the main metrics we use when discussing various end-user performance measurements such as "page speed".

Fig 1) A diagram we have been using in conversations to help illustrate the various events and how they inter-relate.

#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]
@edelbalso
edelbalso / Notes.md
Created December 18, 2012 18:36 — forked from bosoxbill/Notes.md

Setup RVM/Rails

With RVM installed, I like to maintain a gemset called new_projects. This has whatever rails version I want to be creating new projects with.

$ rvm 1.9.3@new_projects --verbose --create
$ gem install rails

Rails Setup Commands

@edelbalso
edelbalso / widget.js
Last active December 11, 2015 23:28 — forked from uhhuhyeah/widget.js
window.utils = window.utils || {};
utils.Grid = function() {
 // Defaults
 var that = this;
 this.idealColumnWidth = 320;
 this.marginHoriz = 15;
   
 // Public Interface
 var setupGrid = function(opts) {
require 'faraday_middleware'
require 'hashie/mash'
# Public: GeoIP service using freegeoip.net
#
# See https://github.com/fiorix/freegeoip#readme
#
# Examples
#
# res = GeoipService.new.call '173.194.64.19'
require 'faraday_middleware'
require 'hashie/mash'
# Public: GeoIP service using freegeoip.net
#
# See https://github.com/fiorix/freegeoip#readme
#
# Examples
#
# res = GeoipService.new.call '173.194.64.19'