Skip to content

Instantly share code, notes, and snippets.

View aitor's full-sized avatar
👊
Working!

Aitor García Rey aitor

👊
Working!
View GitHub Profile

As a global platform for creativity and self-expression, Tumblr is deeply committed to supporting and protecting freedom of speech. At the same time, we draw lines around a few narrowly defined but deeply important categories of content and behavior that jeopardize our users, threaten our infrastructure, and damage our community.

What Tumblr is for:

Tumblr celebrates creativity. We want you to express yourself freely and use Tumblr to reflect who you are, and what you love, think, and stand for. What Tumblr is not for:

  • Malicious Speech. Don't encourage violence or hatred on the basis of things like race, ethnic origin, religion, disability, gender, age, veteran status, or sexual orientation. We encourage you to dismantle negative speech through argument rather than censorship. We will, however, remove anything that is overtly malicious.

  • Harm to Minors. Be thoughtful when posting anything involving a minor. Don't post or solicit anything relating to minors that is sexually suggestive or violent. Don’

At the bottom of the heart of every human… there is something that goes on indomitably expecting, in the teeth of all experience of crimes committed, suffered, and witnessed, that good and not evil will be done to him. It is this above all that is sacred in every human being.

Simone Weil

@aitor
aitor / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
.DS_Store
myapp/
require 'net/http'
class Object
def method_missing(methId)
suggestion = Net::HTTP.get('search.yahooapis.com', "/WebSearchService/V1/spellingSuggestion?appid=YahooDemo&query=#{methId.to_s}")
method = /<Result>(.*)<\/Result>/.match(suggestion)
if method
puts "#{method[1]} bloody bastard, is ****#{method[1].upcase}****, not #{methId}... read the fucking docs!!!"
self.send method[1]
else
puts "what the hell '#{methId}' is bloody bastard?... read the fucking docs!!!"
@aitor
aitor / gist:9404
Created September 8, 2008 09:54
Fake community
require 'faker'
require 'colored'
class Object
def tap
yield self
self
end
end
class Percentage
//
// copied from: http://www.tek-tips.com/viewthread.cfm?qid=1465395&page=5
// TODO: reference original author...
//
function copy(rubyurl) {
var flashcopier = 'flashcopier';
if(!document.getElementById(flashcopier)) {
var divholder = document.createElement('div');
divholder.id = flashcopier;
document.body.appendChild(divholder);
//
// copied from: http://www.tek-tips.com/viewthread.cfm?qid=1465395&page=5
// TODO: reference original author...
//
function copy(rubyurl) {
var flashcopier = 'flashcopier';
if(!document.getElementById(flashcopier)) {
var divholder = document.createElement('div');
divholder.id = flashcopier;
document.body.appendChild(divholder);
setup do
@margie = Factory(:user, :login => 'm.thatcher')
@jaiku = Factory(:jaiku, :content => "To solve Britain’s economic Disease with Socialism is like treating leukaemia with leeches.", :user => @margie)
@activity = @jaiku.activities.first
end
should 'link the activities created on a model with the user that is generating the activity' do
assert_equal @margie, @activity.user, "The activity should be registered as made by the user that create the jaiku"
end
require 'rubygems'
require 'hpricot'
require 'open-uri'
# el de Ara t. Howard no el de facets.
require 'openobject'
def scrap(element, id)
img = element.search("/img").first
paragraph = element.search("/p").first