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
class QuestionsController < ApplicationController | |
before_filter :ensure_logged_in | |
def index | |
end | |
def show | |
end | |
def new | |
@question = Question.new | |
end | |
def create |
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
https://stripe.com/docs/button | |
https://stripe.com/docs/api | |
https://stripe.com/docs/button/guides/rails | |
bad card | |
4000 0000 0000 0002 | |
good | |
4242 4242 4242 4242 | |
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
init file | |
GOOGLEKEY='AIzaSyBYPC8Wothfroho8ub3yM6wHtOE--Oovng' | |
application.html.erb | |
<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?key=#{GOOGLEKEY}&sensor=false" %> | |
google.js | |
var map; | |
var canvas; |
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
add gem omniauth-twitter | |
********************************************************************************** | |
initialization file: | |
OmniAuth.config.logger = Rails.logger | |
Rails.application.config.middleware.use OmniAuth::Builder do | |
provider :twitter, ENV['TW_CON_KEY'], ENV['TW_CON_SEC'] | |
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
group :development, :test do | |
gem 'pry-rails' | |
gem 'capybara' | |
gem 'rspec-rails' | |
gem 'launchy' | |
gem 'database_cleaner' | |
end | |
rails g rspec:install |
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
source 'https://rubygems.org' | |
group :development do | |
gem 'annotate' | |
gem 'rails-footnotes' | |
gem 'localtunnel' | |
gem 'quiet_assets' | |
gem 'better_errors' | |
gem 'binding_of_caller' | |
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
# updated 2017-07-16 | |
https://github.com/nojhan/liquidprompt | |
# ----------------------------------------------------------------- # | |
REFERENCES | |
# ----------------------------------------------------------------- # | |
http://ndpsoftware.com/git-cheatsheet.html | |
# ----------------------------------------------------------------- # |
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
txtblk='\[\e[0;30m\]' # Black | |
txtred='\[\e[0;31m\]' # Red | |
txtgrn='\[\e[0;32m\]' # Green | |
txtylw='\[\e[0;33m\]' # Yellow | |
txtblu='\[\e[0;34m\]' # Blue | |
txtpur='\[\e[0;35m\]' # Purple | |
txtcyn='\[\e[0;36m\]' # Cyan | |
txtwht='\[\e[0;37m\]' # White | |
txtrst='\[\e[0m\]' # Text Reset |
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 | |
branches = STDIN.read.chomp | |
if !branches.empty? | |
branch = branches.split("\n").map(&:strip)[0].split(' ').map(&:strip)[-1] | |
second_line = branches.split("\n").map(&:strip)[1] | |
is_clean = second_line == "nothing to commit, working directory clean" | |
if !branches.empty? | |
if is_clean | |
puts " ✓ #{branch}" | |
else |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true, | |
"highlight_active_indent_guide": true, | |
"tab_size": 2, | |
"font_face": "Source Code Pro Light", | |
"font_size": 13, |