Skip to content

Instantly share code, notes, and snippets.

caike /
Last active September 18, 2017 19:34 — forked from wmakley/
Install Ruby 1.8.7 on Mac OSX 10.12 Sierra with rbenv
# The main issues with Ruby 1.8.7 are that it won't build with Clang,
# and the Net::HTTPS module won't work with modern versions of OpenSSL.
# This assumes you have already set up homebrew, and run: xcode-select --install
#brew install homebrew/dupes/apple-gcc42
#brew install libyaml libffi
brew install
export CC=/usr/local/bin/gcc-4.2
caike / cart.exs
Created August 30, 2016 21:56 — forked from dtzitz/cart.exs
# from ounce of elixir
defmodule CartTest do
use ExUnit.Case
test "starts with empty count" do
assert Cart.count_items([]) == 0
caike / import.rb
Created September 23, 2013 23:57 — forked from evanwalsh/import.rb
# coding: utf-8
require 'rubygems'
require 'hpricot'
require 'fileutils'
require 'safe_yaml'
require 'time'
module JekyllImport
# This importer takes a wordpress.xml file, which can be exported from your
caike / decorators_poro.rb
Created October 26, 2012 12:49
class Poet
def produce_art(inspiration)
"#{inspiration} !"
class ArtistDecorator <
def produce_art(inspiration)
caike / lab4.html
Created April 15, 2011 14:08 — forked from jcasimir/lab4.html
<script type="text/javascript" src=""></script>
<table id="logistics">
<tr id='time'>
# Even when you create objects they should be properly scoped... Remember this example?
t =
t.status = "RT #{}: #{@tweet.status}"
t.original_tweet = @tweet
t.user = current_user
# A simplified version of this, properly scoped might look like this:
# A user has many tweets.. and sometimes we want to retweet.
class TweetsController < ApplicationController
def retweet
@tweet = Tweet.find(params[:id])
if @tweet.user == current_user
flash[:notice] = "Sorry, you can't retweet your own tweets"
elsif @tweet.retweets.where(:user_id =>
ATENÇÃO: os links estão ordenados alfabeticamente. Siga esta nomenclatura ao adicionar o seu.
<ul id="blogroll">
<li><a href="">Caike Souza</a></li>
<li><a href="">Marcos Tapajós</a></li>
<li><a href="">Rafael Lima</a></li>
<li><a href="">Rafael Tauil</a></li>
<li><a href="">Ramon Bispo</a></li>