Skip to content

Instantly share code, notes, and snippets.

Lautaro Orazi tarolandia

Block or report user

Report or block tarolandia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tarolandia / resetForm.js
Created Jul 22, 2011
Add resetAform to jQuery
View resetForm.js
reset: function() {
return this.each(function() {
$(this).is('form') && this.reset();
View edittodomethods.rb
def edit
@todo = Todo.find(params[:id])
if @todo.nil?
flash[:notice] = "Empty item"
redirect_to :action => 'index'
View whois.rb
require 'rubygems'
require 'sinatra'
require 'whois'
require 'json'
get '/whois/:domain' do |domain|
c =
r = c.query(domain)
puts r
View tmonster.php
define("HMAC_ERROR", 1);
define("EMAIL_ERROR", 2);
define("REQUEST_ERROR", 3);
define("POST_ERROR", 4);
require_once 'includes/Zend/Loader/Autoloader.php';
$response = array("result" => 0, "link" => "", "error" => 0);
class Target
contruct: (center,radio,points) ->
@center = center
@radio = radio
@points = points
isHit: (hit) ->
getScore: (hit) ->
tarolandia / gist:2039963
Created Mar 14, 2012
Recover linux after Win installation
View gist:2039963
su -c grub
find /boot/grub/stage1
root (hdX,Y)
setup (hdX)
View tst.rb
#Sinatra doesn’t know this ditty.
#Try this:
#get '/thumb/https%3a/' #do
# "Hello World"
require 'sinatra'
View epic.php
foreach($values as $key=>$val) {
if (!isset($values[$key])) {
tarolandia / test.rb
Created Oct 31, 2012
Testing create action
View test.rb
require 'spec_helper'
describe UsersController do
describe "User creation" do
it "should create a new user" do
@user = mock_model(User,
:email => '',
:password => 'test',
:name => 'tester',
tarolandia / mandrill.rb
Created Nov 2, 2012
Mandrill API error very useful :/
View mandrill.rb
req ='/api/1.0/messages/send.json', initheader = {'Content-Type' =>'application/json'})
req.body = @request.to_json
http =, @uri.port)
http.use_ssl = true
response = http.start {|http| http.request(req) }
puts "Response #{response.code} #{response.message}: #{response.body}"
# => Response 500 Internal Server Error: {"status":"error","code":-100,"name":"GeneralError","message":"An unknown error occurred processing your request. Please try again later."}
You can’t perform that action at this time.