###to discard unstaged changes
git checkout .
git checkout <filename>
git reset HEAD <filename>
###to remove unstagged changes
##install git | |
sudo apt-get install git | |
##configure git for commit info | |
git config --global user.name "Mizan Rahman" | |
git config --global user.email [email protected] | |
##configure github | |
git config --global github.user mizanRahman |
#setup/manage ssh key------------------------------------------ | |
##https://devcenter.heroku.com/articles/keys | |
#To generate a public key: | |
ssh-keygen -t rsa | |
#to add the key | |
heroku keys:add | |
#to see all available remotes | |
git remote -v |
rails new test_app | |
cd test_appli | |
git init | |
git add . | |
git commit -m "initial commit" | |
heroku create --stack cedar | |
git push heroku master | |
heroku run rake db:migrate |
desc "commit source to github" | |
task :sync do | |
puts "syncing source files to github" | |
system "git add ." | |
puts "\n## Commiting: Site updated at #{Time.now.utc}" | |
message = "Site updated at #{Time.now.utc}" | |
system "git commit -m \"#{message}\"" | |
puts "\n## Pushing source files" | |
system "git push origin source" | |
puts "\n##Source Sync completed" |
#!/usr/bin/env rake | |
remote_repos = { | |
"github" => "github", | |
"bitbucket" => "origin" | |
} | |
deploy_remotes = {'heroku'=>"heroku"} |
<% @profile.errors.full_messages.each do |msg| %> | |
<p class="alert"><%= msg %></p> | |
<% end %> |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
brew install ruby |
#Important gems list
##Production
##Development
##test
require 'rubygems' | |
require 'fog' | |
# create a connection | |
connection = Fog::Storage.new({ | |
:provider => 'AWS', | |
:aws_access_key_id => YOUR_AWS_ACCESS_KEY_ID, | |
:aws_secret_access_key => YOUR_AWS_SECRET_ACCESS_KEY | |
}) |