Skip to content

Instantly share code, notes, and snippets.

Working from home

Ismael Marin igmarin

Working from home
View GitHub Profile
igmarin / gist:1070034
Created Jul 7, 2011
Bigriveripn Mail
View gist:1070034
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style type="text/css" media=screen>
igmarin / gist:1878057
Created Feb 21, 2012
Template Nebula base rails 3.0.X
View gist:1878057
run "rm public/index.html"
run "mkdir app/controllers/admin"
generate(:controller, "public index admin")
route "root to: 'public#index'"
run "echo 'config/database.yml' >> .gitignore"
run "echo .DS_Store >> .gitignore"
git :init
git :add => "."
git :commit => "-am 'Commit inicial'"
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}")
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 / 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
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 / 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 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 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 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