Skip to content

Instantly share code, notes, and snippets.

Working from home

Ismael G Marin C igmarin

Working from home
View GitHub Profile
View subscribe_segment
def subscribe_to_segment(name, users, list_name = DEFAULT_LIST)
@list_id = find_list(list_name)
segment = find_segment(name, list_name, 'static')
users.each do |user|
@gb.lists.subscribe({id: @list_id, email: {email:}, merge_vars: {FNAME: user.display_name, LNAME: user.display_name}, double_optin: false})
#batch = users.is_a?(Array) ? users.collect{ |u| {email:} } : (users.kind_of?(User) ? [{ email: }] : [{ email: users.to_s }])
@gb.lists.static_segment_members_add({ id: @list_id, seg_id: segment["id"], batch: users})#if list_id and segment and batch
igmarin / mail_to_list
Created Jan 17, 2014
MailChimp method with Gibbon gem to add a user to a list
View mail_to_list
  def add_user_to_mailchimp
    return if email.include?(ENV['ADMIN_EMAIL'])
    mailchimp =
    result = mailchimp.lists.subscribe({
      :id => ENV['MAILCHIMP_LIST_ID'],
      :email => {:email =>},
      :double_optin => false,
      :update_existing => true,
View LineamientosAsesorias
- Aprender tecnologías utilizadas para el desarrollo de aplicaciones web, mejores prácticas y el proceso de desarrollo ágil.
- Participar en proyectos bajo la supervisión de un mentor.
- Mejorar las habilidades y experiencia de los participantes
- Definir y mejorar un proceso para el ingreso de nuevas personas al equipo (reduciendo curva de aprendizaje).
# Como funciona
- Reuniones 1 vez a la semana para seguimiento.
View Rails Basics
This Guides serves as an introduction to the Rails Framework as some of the Keypoints to understand how it works and this is a guide as a learning path
## RESOURCES (complete guides)
View gist:5959224
igmarin / sphero_mac_connect
Created Jun 27, 2013
This is the first part of the Guide to Connect Sphero with Mac
View sphero_mac_connect
Connect Sphero with your Mac
To connect your Mac with Sphero we need to download and install [Multicom](
The connection between your Sphero(s) and your Mac will be created by a serial port connection using your bluetooth in your mac.
Set up a new device
View test_sphero_1.rb
require 'artoo'
connection :sphero, :adaptor => :sphero, :port => ''
device :sphero, :driver => :sphero
work do
every(1.seconds) do
sphero.roll 90, rand(360)
igmarin / Error Message
Created Jun 15, 2013
gem install hybridgroup-serialport error missing library
View Error Message
Building native extensions. This could take a while...
ERROR: Error installing hybridgroup-serialport:
ERROR: Failed to build gem native extension.
/Users/igmarin/.rvm/rubies/rbx-head/bin/rbx extconf.rb
checking for OS... apple
checking for termios.h... yes
checking for unistd.h... yes
creating Makefile
igmarin / bobo.rb
Last active Dec 14, 2015
Little example using const_missing, after reading Chap3 of Rebuilding Rails, this is how rails works.
View bobo.rb
class Object
def self.const_missing c
STDERR.puts "Missing constant: #{c.inspect}"
class Bobo < Object
def hello
puts "Hi Bobo!"
igmarin / gatito.rb
Created Feb 9, 2013
My example for Bajio on Rails Feb 9 meeting
View gatito.rb
require 'open-uri'
puts "Por favor escribe el width:"
width = gets.chomp!
puts "Por favor escribe el height:"
height = gets.chomp!
gatitos = open("{width}/#{height}")
You can’t perform that action at this time.