Skip to content

Instantly share code, notes, and snippets.

View th1agoalmeida's full-sized avatar
🏠
Working mostly from home since 2006

Thiago Almeida th1agoalmeida

🏠
Working mostly from home since 2006
View GitHub Profile
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
require 'spec_helper'
# This spec was generated by rspec-rails when you ran the scaffold generator.
# It demonstrates how one might use RSpec to specify the controller code that
# was generated by Rails when you ran the scaffold generator.
#
# It assumes that the implementation code is generated by the rails scaffold
# generator. If you are using any extension libraries to generate different
# controller code, this generated spec may or may not pass.
#
@joshuap
joshuap / mp3_update
Created February 21, 2012 19:08
Systematically retrieve audio files from popular mp3 blogs
#!/usr/bin/env ruby
require 'nokogiri'
require 'open-uri'
class Mp3Crawler
def initialize(url)
@data = Nokogiri::XML(open(url))
end
def links
if
@sentiment["mood"] == positive && @sentiment["prob"] > 0.94
@tag.score = 100
elsif
@sentiment["mood"] == positive && @sentiment["prob"] > 0.89
@tag.score = 96
elsif
@sentiment["mood"] == positive && @sentiment["prob"] > 0.84
@tag.score = 92
elsif