This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Updating Ubuntu | |
sudo aptitude update | |
sudo aptitude --assume-yes dist-upgrade | |
# Installing vim | |
sudo aptitude --assume-yes install vim vim-gnome | |
# Installing dependencies | |
sudo aptitude --assume-yes install build-essential |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# template.rb | |
# from Anderson Dias | |
#==================== | |
# PLUGINS | |
#==================== | |
# Testing | |
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git' | |
plugin 'cucumber', :git => 'git://github.com/aslakhellesoy/cucumber.git' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb | |
index e62cec6..336f7c4 100644 | |
--- a/activesupport/lib/active_support/cache.rb | |
+++ b/activesupport/lib/active_support/cache.rb | |
@@ -221,3 +221,4 @@ require 'active_support/cache/memory_store' | |
require 'active_support/cache/drb_store' | |
require 'active_support/cache/mem_cache_store' | |
require 'active_support/cache/compressed_mem_cache_store' | |
+require 'active_support/cache/no_store' | |
diff --git a/activesupport/lib/active_support/cache/no_store.rb b/activesupport/lib/active_support/cache/no_store.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Authors: Anderson Dias (andersondias.github.com) and João Vitor (joaovitor.github.com) | |
# This monkey patch intends to solve cache errors on development environment when config.cache_classes = false. | |
# In order to use it you need to put it into you lib/ folder and | |
# insert "require File.join(RAILS_ROOT, 'lib', 'no_store_cache_monkey_patch')" | |
# after the "require File.join(File.dirname(__FILE__), 'boot')" line in config/environment.rb: | |
module ActiveSupport | |
module Cache | |
class NoStore < Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Use Vim settings, rather then Vi settings (much better!). | |
"This must be first, because it changes other options as a side effect. | |
set nocompatible | |
"allow backspacing over everything in insert mode | |
set backspace=indent,eol,start | |
"store lots of :cmdline history | |
set history=1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ScopeByAttribute | |
def self.included(base) | |
base.send(:extend, ScopeByAttribute::ClassMethods) | |
end | |
module ClassMethods | |
def scope_by_attribute(attribute) | |
@scoped_attributes ||= [] | |
@scoped_attributes << attribute.to_sym | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Utils | |
sudo apt-get install htop | |
sudo apt-get install gnome-do | |
sudo apt-get install exuberant-ctags ncurses-term | |
sudo apt-get install vim-gnome | |
sudo apt-get install inkscape | |
sudo apt-get install sun-java6-jdk | |
sudo apt-get install compizconfig-settings-manager | |
sudo apt-get install ubuntu-restricted-extras |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
public class Price { | |
private int value; | |
public Price(int value) { | |
this.value = value; | |
} | |
public int getValue() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependencies: libnotify-bin sox | |
# Sound file download: http://www.soundjay.com/clock/alarm-clock-1.wav | |
DISPLAY=:0 notify-send -t 1000 -i ~/Pictures/icons/pomodoro.png "New Pomodoro starts" "You have 45 minutes to work." | |
while true; do | |
sleep 2700 # 45 minutes | |
DISPLAY=:0 notify-send -t 1000 -i ~/Pictures/icons/pomodoro.png "Pomodoro ends" "Take a break for 15 minutes!" | |
play ~/Music/effects/alarm-clock-1.wav | |
sleep 900 # 15 minutes | |
DISPLAY=:0 notify-send -t 1000 -i ~/Pictures/icons/pomodoro.png "New Pomodoro starts" "You have 45 minutes to work." | |
play ~/Music/effects/alarm-clock-1.wav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.s status | |
git config --global alias.a add | |
git config --global alias.d diff | |
git config --global alias.g grep | |
git config --global alias.b branch | |
git config --global alias.c commit | |
git config --global alias.co checkout | |
git config --global alias.mt mergetool | |
git config --global color.diff auto | |
git config --global color.status auto |
OlderNewer