Skip to content

Instantly share code, notes, and snippets.

View AhmedNadar's full-sized avatar
🌎
Ready to work remote with you 😀 💻 🤝 👏🏼

Ahmed Nadar AhmedNadar

🌎
Ready to work remote with you 😀 💻 🤝 👏🏼
View GitHub Profile
@AhmedNadar
AhmedNadar / application.html.erb
Created November 22, 2013 21:33
Using rails flash messages with Twitter Bootstrap. 1- Add <%= flash_messages %> to "application.html.erb" 2- Add 'flash_messages' method to "application_helper.rb"
<body>
<div class="container">
<%= render "layouts/header" %>
<%= flash_messages %>
<%= yield %>
<%= render "layouts/footer" %>
</div
</body>
git :init
git add: "."
git commit: %Q{ -m 'Initial commit' }
# Twitter bootstrap baby
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
# Incase you want less
gem 'less-rails'
# jQuery is the win
gem 'jquery-rails'
# coding: utf-8
# This is a Rails init template
# Usage
#
# $ rails new app_name -d postgresql -m https://raw.github.com/gist/3303948 --skip-bundle
#
# remove files
run "rm README.rdoc"
run "touch README.md"
## Rails App Template
## Updated for Rails 3.2.8
## Updated on 9/24/12
## Run using $ rails new [appname] -JT -m https://raw.github.com/gist/960988/template.rb
## Gems
# General
gem 'rake', '0.9.2.2'
# Warden and Devise for security
# add gems
gem 'whenever'
gem 'kaminari'
gem 'hpricot'
gem 'ruby_parser'
gem 'jquery-rails'
gem "jquery-ui-rails"
gem 'bcrypt-ruby', '~> 3.0.0'
gem "rspec-rails", :group => [ :development, :test ]
gem "ffaker", :group => :test
# Helpers
def git_update(message)
git :add => ".", :commit => "-m '#{message}'"
end
def git_remove(file)
git :rm => file
end
{
"after_callback": "",
"auto_complete_commit_on_tab": true,
"before_callback": "",
"bold_folder_labels": true,
"check_for_bundler": true,
"check_for_rbenv": true,
"check_for_rvm": true,
"check_for_spring": true,
"color_scheme": "Packages/User/Flatland Monokai (SL).tmTheme",
# Update, upgrade and install development tools:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential git-core libssl-dev libsqlite3-dev curl nodejs nginx
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
# Add rbenv to the path:
echo 'export RBENV_ROOT=~/.rbenv' >> ~/.bash_profile

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev