Skip to content

Instantly share code, notes, and snippets.

View zeitan's full-sized avatar

Antonio Bastardo zeitan

View GitHub Profile
{"show_id":80379,"season":"7","episode":"19","date":"2014-05-13T01:21:27.201Z","_id":"1evn2fjYPPMIexLt"}
{"show_id":"267815","season":"1","episode":"13","type":"episode","date":"2014-06-21T15:08:19.353Z","_id":"4rEmCMlL0UKTWbnD"}
{"show_id":"277462","season":"1","episode":"1","type":"episode","date":"2014-06-22T16:41:14.304Z","_id":"92JV8y0wXexvXA2m"}
{"show_id":"260315","season":"2","episode":"5","type":"episode","date":"2014-05-25T14:25:17.513Z","_id":"HC8P3MnImMCPxcHD"}
{"show_id":"267815","season":"1","episode":"14","type":"episode","date":"2014-06-21T15:55:57.315Z","_id":"HUIl75qntDGCneZR"}
{"show_id":"267815","season":"1","episode":"12","type":"episode","date":"2014-06-21T05:06:59.662Z","_id":"IdUMwvGTCh9M6L3q"}
{"show_id":80379,"season":"7","episode":"17","date":"2014-05-12T02:46:14.937Z","_id":"J79Rfv4OMmfPJWea"}
{"show_id":80379,"season":"7","episode":"10","date":"2014-05-12T00:03:35.750Z","_id":"JXSj4tXd8Z7Zd6Ql"}
{"show_id":"265766","season":"1","episode":"2","type":"episode","date":"2014-06-20T02:
module Foo
[:debug, :info, :warn, :error, :fatal].each do |level|
define_method level do |msg|
p 'dummy 1'
end
end
module_function :debug, :info, :warn, :error, :fatal
private
results
=> [#<Result id: 3, match_id: 3, team_id: nil, goals: 5, created_at: "2010-04-14 18:48:41", updated_at: "2010-04-14 18:48:41">, #<Result id: 4, match_id: 3, team_id: nil, goals: 7, created_at: "2010-04-14 18:48:41", updated_at: "2010-04-14 18:48:41">, #<Result id: nil, match_id: 3, team_id: 2, goals: 0, created_at: nil, updated_at: nil>, #<Result id: nil, match_id: 3, team_id: 1, goals: 0, created_at: nil, updated_at: nil>]
<% form_for @person do |person_form| %>
<%= person_form.label :name %>
<%= person_form.text_field :name %>
<% person_form.fields_for :children do |child_form| %>
<%= child_form.label :name %>
<%= child_form.text_field :name %>
ruby-1.8.7-p352@SSABA:
system:
uname: "Linux ba-2027l 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:09:46 UTC 2011 i686 GNU/Linux"
bash: "/bin/bash => GNU bash, versión 4.1.5(1)-release (i486-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.7.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"
_form.html.erb
<% fields_for :embargos,i=0 do |f| %>
<%= render :partial => 'cargafamiliarembargos', :locals => {:form_embargo => f,:data=>@embargos[i]} %>
<%i=i.next%>
<% end %>
_cargafamiliarembargos.html.erb
<tr >
<td><%=h data.NombreTrabajador %></td>
<td><%=h data.NombreMenor %></td>
@zeitan
zeitan / boostrap.css
Created February 13, 2012 18:17
CSS boostrap
.carousel .active {
left: 0;
}
bootstrap.css (línea 3267)
.carousel .active, .carousel .next, .carousel .prev {
display: block;
}
bootstrap.css (línea 3264)
.carousel .item {
-moz-transition: left 0.6s ease-in-out 0s;
@zeitan
zeitan / Instalacion.txt
Created March 15, 2012 17:02
Como instalar rvm+nginx+passenger+php en debian squeeze
Instalar RVM como root
# echo 'export rvm_prefix="$HOME"' > /root/.rvmrc
# echo 'export rvm_path="$HOME/.rvm"' >> /root/.rvmrc
# bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
# type rvm | head -1
# rvm requirements
Instalamos lo que haga falta
@zeitan
zeitan / gist:2152091
Created March 21, 2012 19:55
Product.rb
#Product es la representacion logica de un producto dentro de la BD de allihay, son estos a los que se les hace chekin, pertenecen a alguna categoria y pueden tener atributos via la tabla de Product_Characteristics
# t.string "name", :null => false
# t.integer "category_id"
# t.datetime "created_at"
# t.datetime "updated_at"
#
#Implementa las siguientes validaciones
# validates :name, :presence => true, :uniqueness => { :case_sensitive => false }, :allow_blank => false
# validate :category_should_exists
#
json.(collection, :id, :name)