Skip to content

Instantly share code, notes, and snippets.

View halan's full-sized avatar
🛹

Halan Pinheiro halan

🛹
View GitHub Profile
@halan
halan / .vimrc
Created April 4, 2013 17:40 — forked from brennovich/.vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
@halan
halan / gist:4171492
Created November 29, 2012 20:01 — forked from cesarmedeiros/gist:4171441
Sugestão de leituras com base no Tracking de leituras anteriores
require 'rubygems'
require 'redis'
class Datanosql
def initialize
@r = Redis.new
end
@halan
halan / links.textile
Created November 13, 2012 16:03 — forked from lucashungaro/links.textile
Links de referência utilizados em minha palestra
{ "_id" : { "$oid" : "50747679c863c75a39000000" }, "cols" : [ { "news" : [ { "ref_id" : "233636", "type" : "noticia", "imag" : "104328", "perm" : "/noticia/pp-e-o-campeao-de-votos-na-eleicao-para-vereador/233636", "titl" : "PP é o campeão de votos na eleição para vereador", "chap" : "Política", "suti" : "", "styl" : "direita" } ] }, { "news" : [ { "ref_id" : "233638", "type" : "noticia", "perm" : "/noticia/candidatos-estao-em-busca-de-apoios-para-o-2o-turno/233638", "titl" : "Candidatos estão em busca de apoios para o 2º turno", "chap" : "Política", "suti" : "", "styl" : "direita" } ] }, { "news" : [ { "ref_id" : "233660", "type" : "noticia", "perm" : "/noticia/resultado-da-eleicao-em-quatro-cidades-sera-alterado/233660", "titl" : "Resultado da eleição em quatro cidades será alterado", "chap" : "Política", "suti" : "", "styl" : "esquerda" } ] } ] }
{ "_id" : { "$oid" : "5074767bc863c75a39000001" }, "cols" : [ { "news" : [ { "ref_id" : "233636", "type" : "noticia", "imag" : "104328", "perm" : "/noticia/pp-e-o-
require 'sinatra'
require 'mechanize'
require 'haml'
get '/' do
nickname = 'cogumm'
board = 'nerd'
url = "http://pinterest.com/#{nickname}/#{board}"
pin_class = 'PinImageImg'
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
attr_accessible :email, :password, :password_confirmation, :remember_me
belongs_to :account, :polymorphic => true
def realstater?
require('zappa') ->
@enable 'serve jquery'
@get '/': ->
@render index: {layout: no}
@on 'set nickname': ->
@client.nickname = @data.nickname
@on said: ->
function showAddress(address) {
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (!point) {
alert(address + " not found");
} else {
map.setCenter(point, 13);
var marker = new GMarker(point);
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, error);
} else {
error('not supported');
}