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
ps -u kneipp -o rss,command | grep -v peruser | awk '{sum+=$1} END {print sum/1024}' |
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
sudo easy_install pip | |
sudo pip install virtualenv | |
mkdir -p ~/workspace | |
cd ~/workspace/ | |
virtualenv django --no-site-packages |
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
# encoding: UTF-8 | |
ActiveAdmin.register Task do | |
scope :all, :default => true | |
scope :desta_semana do |tasks| | |
tasks.where('final_date >= ? and final_date < ?', -1.day.from_now, 1.week.from_now) | |
end | |
scope :atrasadas do |tasks| | |
tasks.where('final_date < ? and is_done = ?', -1.day.from_now, false) | |
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
1) | |
/Users/kneipp/.rvm/bin/rvm-auto-ruby | |
2) # ~/.rvm/bin/textmate_ruby | |
#!/usr/bin/env sh | |
source ~/.rvm/scripts/rvm | |
cd . | |
exec ruby "$@" |
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
gem update `gem list | cut -d ' ' -f 1` |
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
apachectl -V | grep SERVER_CONFIG_FILE |
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
-without-homebrew-php |
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
$( document ).ready(function() { | |
$("a").attr("target","_blank"); | |
}); |
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
$ find . -type f -name '*.DS_Store' -ls -delete # Remover arquivos .DS_Store de forma recursiva (mac users). #unixtip |
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
//em construcao | |
date_default_timezone_set("America/Sao_Paulo"); | |
if (Session::has('access') or (time() > mktime(0, 0, 1, 8, 23, 2014))) { | |
Route::get('/', 'HomeController@index'); | |
} else { | |
Route::get('/', function () { | |
return View::make('underConstruction'); | |
}); | |
} | |
Route::get('/your-url-here', function () { |