Skip to content

Instantly share code, notes, and snippets.

View tarolandia's full-sized avatar

Lautaro Orazi tarolandia

  • Theorem LLC
  • Valencia, Spain
View GitHub Profile
module Taro
def hello
end
end
module Gonza
module Taro
def hello
::Taro.hello
end

el artículo 27 del Anexo I del Decreto Nº 1158/01 exige que toda comunicación con fines de publicidad que se realice por correo, teléfono, correo electrónico, internet u otro medio de distancia a conocer, deberá indicar, en forma expresa y destacaba, la posibilidad del titular del dato de solicitar el retiro o bloqueo total o parcial de su nombre de la base de datos, pudiendo también solicitar se le informe el nombre del responsable o usuario del banco de datos que proveyó la información.

@tarolandia
tarolandia / resetForm.js
Created July 22, 2011 20:47
Add resetAform to jQuery
$.fn.extend({
reset: function() {
return this.each(function() {
$(this).is('form') && this.reset();
});
}
});
@tarolandia
tarolandia / edittodomethods.rb
Created October 11, 2011 21:53
Edit todo item
...
def edit
@todo = Todo.find(params[:id])
if @todo.nil?
flash[:notice] = "Empty item"
redirect_to :action => 'index'
end
@tarolandia
tarolandia / whois.rb
Created December 26, 2011 15:22
whois server
require 'rubygems'
require 'sinatra'
require 'whois'
require 'json'
get '/whois/:domain' do |domain|
c = Whois::Client.new
r = c.query(domain)
puts r
r
<?php
define("HMAC_ERROR", 1);
define("EMAIL_ERROR", 2);
define("REQUEST_ERROR", 3);
define("POST_ERROR", 4);
require_once 'includes/Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();
$response = array("result" => 0, "link" => "", "error" => 0);
class Target
contruct: (center,radio,points) ->
@center = center
@radio = radio
@points = points
isHit: (hit) ->
getScore: (hit) ->
@tarolandia
tarolandia / gist:2039963
Created March 14, 2012 22:16
Recover linux after Win installation
su -c grub
find /boot/grub/stage1
root (hdX,Y)
setup (hdX)
@tarolandia
tarolandia / tst.rb
Created June 29, 2012 18:48
Sinatra app
#GET http://0.0.0.0:4567/thumb/https%3a%2f%2ftwimg0-a.akamaihd.net%2fprofile_images%2f1615677010%2f34214a75-4b21-46ae-89b4-2e44e356dc92_normal.png
#Sinatra doesn’t know this ditty.
#Try this:
#get '/thumb/https%3a/twimg0-a.akamaihd.net/profile_images/1615677010/34214a75-4b21-46ae-89b4-2e44e356dc92_normal.png' #do
# "Hello World"
#end
require 'sinatra'
foreach($values as $key=>$val) {
if (!isset($values[$key])) {
unset($values[$key]);
}
}