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
View gist:362203
from unittest import TestCase, main
import re
class WordList(object):
def __init__(self, unsorted_words):
self.unsorted_words = unsorted_words
def unsorted(self):
return self.unsorted_words
View gist:374354
## shared connections from profile search result
scan(/(\s[a-zA-Z]+\s+[a-zA-Z]+)/).each do |n|
p n.to_s.strip.gsub(/\s+/, ' ')
View installing ruby-1.8.6-p111
Ruby compile error (openssl problem)
TAGS: None
Found these error:
view sourceprint?
compiling openssl
gcc -I. -I../../.ext/include/i686-darwin10.2.0 -I../.././include -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -fno-common -g -O2 -pipe -fno-common -o openssl_missing.o -c openssl_missing.c
In file included from openssl_missing.c:22:
View meu prompt
export PS1='[\W `~/.rvm/bin/rvm-prompt v p g ` `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\[\033[1\;32m\]\(\\\\\1\)\/`\[\033[37m\]]$\[\033[00m\] '
View mysql ruby gem on Leopard
env ARCHFLAGS="-arch i386" gem install mysql -- \
--with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \
View start mysql on startup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View prompt (git, rvm)
export PS1='[\W `~/.rvm/bin/rvm-prompt v p g ` `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\[\033[1\;32m\]\(\\\\\1\)\/`\[\033[37m\]]$\[\033[00m\] '
View main.rb
class NotANumberException < StandardError
class FizzBuzz
def initialize(numero)
raise NotANumberException unless numero.is_a? Integer
@numero = numero
View prs_spec.js
function round(a, b) {
if (arguments.length != 2){
return "fail";
var matrix = {
caike / gist:733989
Created Dec 8, 2010's current song
View gist:733989
url = ""
resp = HTTParty::get(url)
p resp.parsed_response["lfm"]["recenttracks"]["track"].first {|t| t["nowplaying"] == "true" }
You can’t perform that action at this time.