Skip to content

Instantly share code, notes, and snippets.

View tatiC's full-sized avatar

Tati Carvalho tatiC

  • Untried Possibilities
  • Brasil - Rio de Janeiro
View GitHub Profile
@tatiC
tatiC / gist:4995106
Last active December 13, 2015 23:58
frases
"Give a man a fish and he eats for a day.
Teach a man to fish and he eats for a lifetime."
and the thought which logically followed as a result of the NPR segment:
"Give a man internet access and he will forget he's hungry."
we can change how we react.
The Do Plan, or Why We Know But Don’t Do
@tatiC
tatiC / videos.txt
Last active October 12, 2015 10:48
videos
Programming:
http://programmingisterrible.com/
by Amaury:
Documentário: Muito além do peso
http://www.youtube.com/watch?v=8UGe5GiHCT4&feature=youtu.be
by Maysa:
Excelente entrevista de Jorge Wilheim, urbanista, no Roda Viva da TV Cultura.
@tatiC
tatiC / gist:3192905
Created July 28, 2012 11:19
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@tatiC
tatiC / refactoring_example.rb
Created July 25, 2012 16:41 — forked from mehowte/refactoring_example.rb
Simple refactoring exercises and 2 minute commits version - with updated characterisation tests.
# This is a refactoring exercise.
#
# What to do?
#
# I. Simple refactoring
# 1. Look at the code of the class CorrectAnswerBehavior
# 2. Try to see what it does by running `ruby refactoring_example.rb`
# 3. Record characterisation tests by running `ruby refactoring_example.rb --record`
# 4. Make the code beautiful;)
# 5. You are allowed to modify only the code between markers (REFACTORING START/REFACTORING END).
@tatiC
tatiC / refactoring_example.rb
Created July 21, 2012 18:49
Refactoring exercise from "Programming workout" by Michal Taszycki
# This is a simple refactoring exercise.
#
# What to do?
#
# 1. Look at the code of the class CorrectAnswerBehavior
# 2. Try to see what it does by running `ruby refactoring_example.rb`
# 3. Record characterisation tests by running `ruby refactoring_example.rb --record`
# 4. Make the code beautiful;)
# 5. You are allowed to modify only the code between markers (REFACTORING START/REFACTORING END).
# 6. Test must pass! You can run them with command `ruby refactoring_example.rb --test`
@tatiC
tatiC / inspiration
Created July 21, 2012 01:59
inspiration
‘Not all those who wander are lost.’ ~J.R.R. Tolkien (:zenhabits)
‘Bizarre travel plans are dancing lessons from God.’ ~Kurt Vonnegut (:zenhabits)
‘In proportion as he simplifies his life, the laws of the universe will appear less complex, and solitude will not be solitude, nor poverty poverty, nor weakness weakness.’ ~Henry David Thoreau (:zenhabits)
"É preciso viver, não apenas existir." (Plutarco)
@tatiC
tatiC / find_free_port.rb
Created July 10, 2012 04:22
Free ports
# aliases
# alias scripts="cd /Users/tatic/Dropbox/my_projects/myscripts; ls -la"
# alias freeports="scripts;ports >> ports.txt;ruby freeports.rb;rm ports.txt"
# by: TatiCarvalho 2012
# In the command-line: freeports
# v1.1
@tatiC
tatiC / uninitialized-constant-rakedsl
Created May 11, 2012 15:09
uninitialized-constant-rakedsl
http://stackoverflow.com/questions/6085610/ruby-on-rails-and-rake-problems-uninitialized-constant-rakedsl
Rakefile
require 'rake'
require 'rake/dsl_definition'
@tatiC
tatiC / resque-rails.txt
Created April 19, 2012 17:55
Usando resque-redis numa applicação Rails
refs: https://github.com/defunkt/resque
Instalar redis
Instalar resque
Gemfile: gem 'resque', 'versão', :require => 'resque/server'
Criar arquivo:
lib/tasks/resque.rake
@tatiC
tatiC / heroku_commands.rb
Created October 13, 2011 20:23
heroku_commands.rb
$ heroku help
=== General Commands
help # show this usage
version # show the gem version
login # log in with your heroku credentials
logout # clear local authentication credentials
list # list your apps