This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DomainFilter | |
def initialize(app, domain, &block) | |
@external_app = app | |
@domain_app = Rack::Builder.new(&block) | |
@domain = domain | |
end | |
def call(env) | |
if env["HTTP_HOST"].match(@domain) | |
@domain_app.call(env) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../paper-toggle-button/paper-toggle-button.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def trace(msg) | |
$stderr.puts msg | |
end | |
begin | |
require "rest" | |
rescue LoadError => e | |
trace("Install nap dependency") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oferta de trabajo en Simplelógica http://simplelogica.net keywords: rails, | |
ruby, web, simplelogica, hacking Contacto: david@simplelogica.net Fecha: | |
28/10/2008 | |
Hola, | |
en Simplelógica estamos buscando un/una desarrollador/desarrolladora en Rails | |
para trabajar con nosotros. No necesitamos superexpertos, sino gente que esté | |
entusiasmada por su experiencia con Rails hasta el momento y quiera continuar | |
aprendiendo y mejorando en un entorno bastante agradable, con proyectos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/ruby | |
# This is the software to extract klubbers fm radio podcast. | |
# | |
# You can access the klubbers fm podcast in: | |
# http://klubbersfm.comunidadspaceofsound.net/ | |
# | |
require 'rubygems' | |
require 'sinatra' | |
require 'hpricot' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby -w | |
=begin | |
/*************************************************************************** | |
* Copyright (C) 2008, Paul Lutus * | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 2 of the License, or * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p /usr/local/src && cd /usr/local/src | |
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2 | |
tar -xjvf ruby-1.9.1-p0.tar.bz2 | |
cd ruby-1.9.1-p0 | |
./configure --prefix=/usr --program-suffix=19 --enable-shared | |
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Testing gist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RackEnvironment | |
def initialize(app) | |
@app = app | |
@environments = {} | |
@changes = lambda {} | |
yield self | |
end | |
def call(env) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require File.dirname(__FILE__)+'/../config/environment' | |
ActiveRecord::Migration.create_table(:isam_items, :options => 'ENGINE=MyIsam DEFAULT CHARSET=utf8') do |t| | |
t.string :item_type | |
end | |
ActiveRecord::Migration.create_table(:inno_items, :options => 'ENGINE=InnoDB DEFAULT CHARSET=utf8') do |t| | |
t.string :item_type | |
end |
OlderNewer