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
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
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
# config/initializers/clear_logs.rb | |
# This snippet simply clears your logs when they are too large. | |
# Every time you start the rails environment it checks log sizes | |
# and clears the logs for you if necessary. | |
if Rails.env.development? | |
MAX_LOG_SIZE = 10.megabytes | |
logs = File.join(Rails.root, 'log', '*.log') |
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
desc 'Pushes to heroku demo app' | |
task :push_to_demo => :environment do |t, args| | |
app_name = 'demo' | |
push app_name | |
end | |
def push(app_name) | |
puts "$$$$$$$$$$ Pushing to heroku app: #{app_name}" | |
puts "$$$$$ Pushing to heroku app: #{app_name}" |
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
deployment: | |
continuous_integration_deployment_test: | |
branch: master | |
commands: | |
- git config --global user.email "ci@test.com" | |
- git config --global user.name "Continuous Integration" | |
- git checkout -b with_precompiled_assets | |
- bundle exec rake assets:precompile assets:clean_expired: | |
timeout: 1500 | |
- git add public/assets |
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
<!-- /app/views/admin/users/new_invitiations.html.erb --> | |
<h2>Send invitation</h2> | |
<%= form_for @user, :url => send_invitation_admin_users_path do |f| %> | |
<table style='width: 50%'> | |
<tr> | |
<td><%= f.label :first_name %></td> | |
<td><%= f.text_field :first_name %></td> |
NewerOlder