Skip to content

Instantly share code, notes, and snippets.

public class Persona
{
public string Nombre { get; set; }
public int Edad { get; set; }
private int anioNacimiento, mesNacimiento, diaNacimiento;
public Persona(string nombre, int anioNacimiento, int mesNacimiento, int diaNacimiento)
{
Nombre = nombre;
this.anioNacimiento = anioNacimiento;
@xenda
xenda / better
Created August 10, 2011 19:03
something i forget
(function(a){var b=["foo.js","bar.js"],c=a.getElementsByTagName("script")[0],d,e;for(d in b)e=a.createElement("script"),e.src=b[d],e.async=!0,c.parentNode.insertBefore(e,c)})(document)
Crisis on Multiple Earths, Vol. 1 (Justice League of America #21-22,29-30,37-38,46-47)
Crisis on Multiple Earths, Vol. 2 (Justice League of America #55-56,64-65,72-73,83-84)
Crisis on Multiple Earths, Vol. 3 (Justice League of America #91-92,100-102,107-108,113)
Crisis on Multiple Earths, Vol. 4 (Justice League of America #122-124,135-137,147-148)
Crisis on Multiple Earths, Vol. 5 (Justice League of America #159-160,171-172,183-185)
Crisis on Multiple Earths: The Team-Ups Vol. 1 (The Flash #123,129,137,151; Green Lantern #40; Showcase #55-56, The Brave and the Bold #61)
Crisis on Multiple Earths, The Team-Ups Vol. 2 (The Flash #170,173; Green Lantern #45,52; The Brave and the Bold #62; The Atom #29,36; The Spectre #3)
Crisis on Infinite Earths (#1-12)
Zero Hour: Crisis in Time! (#4-0)
JLA Vol. 5 Justice For All (collects Crisis Times Five)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
require 'nokogiri'
html =<<HERE
<p>Lorem ipsum bla bla.</p>
<table>
<tbody>
<tr><td class="align_center">Lorem</td><td>ipsum</td></tr>
<tr><td class="align_center">Lorem</td><td>ipsum</td></tr>
Logo - 6 años
Basic/QBasic/GRBasic - 7
Darkbasic - 11
C - 11
HTML 11
VB6 12
ASP 12
Assembler 13
Perl 13
Java 14
archivos = "/home/mi_usuario/mis_webs/**/*"
analytics = File.read("codigo_analitica.txt")
Dir.glob[archivos].each do |file|
content = File.read file
content.gsub("</body>", "#{analytics}</body>")
File.open(file, 'rw') do |web|
web.write content
end
end
class Admin::SendListsController < InheritedResources::Base
layout 'admin'
before_filter :authenticate_user!
respond_to :xml, :json
before_filter :setup_send_list, :only => :new
after_filter :update_stock, :only => [:create,:update]
def new
new!{
class SendList < ActiveRecord::Base
belongs_to :destination, :polymorphic => true
belongs_to :store
has_many :send_list_items
has_many :products, :through => :send_list_items
after_initialize :setup_identifier
def total_items
@xenda
xenda / gist:1015005
Created June 8, 2011 18:26 — forked from dhh/gist:1014971
Use concerns to keep your models manageable
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
#{config.root}/app/controllers/concerns
#{config.root}/app/models/concerns
)
end
end