Skip to content

Instantly share code, notes, and snippets.

Carlos Souza caike

Block or report user

Report or block caike

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
caike /
Last active Sep 18, 2017 — 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
View cart.exs
# from ounce of elixir
defmodule CartTest do
use ExUnit.Case
test "starts with empty count" do
assert Cart.count_items([]) == 0
View 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
View decorators_poro.rb
class Poet
def produce_art(inspiration)
"#{inspiration} !"
class ArtistDecorator <
def produce_art(inspiration)
View lab4.html
<script type="text/javascript" src=""></script>
<table id="logistics">
<tr id='time'>
View scope_on_create.rb
# 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:
View BP-FatModelSkinnyController.rb
# 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 =>
View blogroll_horaextra.html
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>
You can’t perform that action at this time.