View default.conf
upstream zealous-badger { | |
server 127.0.0.1:49224; | |
} | |
server { | |
listen [::]:80; | |
listen 80; | |
server_name zealous-badger.example.com; | |
location / { | |
proxy_pass http://zealous-badger; | |
proxy_http_version 1.1; |
View application.html.gara
content_for :content do | |
main(class: 'main-container', role: 'main') { | |
render 'shared/express_blog/sidebar' | |
div(class: 'content-body') { | |
render 'shared/express_admin/messages' | |
if content_for?(:page_header) | |
div(class: 'page-header') { | |
div(class: 'row') { | |
div(class: 'small-12 columns') { | |
yield :page_header |
View Gemfile
source 'https://rubygems.org' | |
gem 'rails', '4.1.6' | |
gem 'sqlite3' | |
gem 'sass-rails', '~> 4.0.3' | |
gem 'uglifier', '>= 1.3.0' | |
gem 'coffee-rails', '~> 4.0.0' | |
gem 'jquery-rails' | |
gem 'turbolinks' | |
gem 'jbuilder', '~> 2.0' |
View curl1.sh
curl -H “Content-Type: application/json" \ | |
-d '{"client_id":"a11bbd9c339e6d8bd84368061089971398e23617d88a7c8dd060555b7cff1077","client_secret":"f079dadcca08a26d5967421f3849447e1e4519d6ba33cabdd4bdd0c86aebded3","grant_type":"password","username":"test@example.com","password":"passw0rd"}' / | |
-X POST http://localhost:3000/oauth/token |
View omniauth_macros.rb
# in spec/support/omniauth_macros.rb | |
module OmniauthMacros | |
def mock_auth_hash | |
# The mock_auth configuration allows you to set per-provider (or default) | |
# authentication hashes to return during integration testing. | |
OmniAuth.config.mock_auth[:twitter] = { | |
'provider' => 'twitter', | |
'uid' => '123545', | |
'user_info' => { | |
'name' => 'mockuser', |
View Console
Failures: | |
1) User when email address is already taken | |
Failure/Error: it { should_not be_valid } | |
expected valid? to return false, got true | |
# ./spec/models/user_spec.rb:73:in `block (3 levels) in <top (required)>' |
View _article.html.erb
<% if user_signed_in? %> | |
<% if current_user.id == article.author.id %> | |
<%= link_to 'Edit article', edit_article_path(article) %> | |
<% end %> | |
<% end %> |
View _article.html.erb
<% if can? :update, article %> | |
<%= link_to 'Edit', edit_article_path(article) %> | |
<% end %> | |
<% if can? :destroy, article %> | |
<%= link_to 'Destroy', article_path(article), :confirm => 'Are you sure?', :method => :delete %> | |
<% end %> |
View database.yml
development: | |
adapter: mysql2 | |
encoding: utf8 | |
reconnect: false | |
database: projectname_development | |
pool: 5 | |
host: localhost | |
username: username | |
password: password |
View index.html
<!-- | |
Error: Object doesn't support property or method 'attr' | |
--> | |
<div class='popover' id='playlist_menu'> | |
<ul class='toplay' style='overflow:auto'> | |
<li class='playlist_item' data-id='27' data-order='1' id='videos_27'></li> | |
<li class='playlist_item' data-id='1' data-order='2' id='videos_1'></li> | |
<li class='playlist_item' data-id='52' data-order='3' id='videos_52'></li> | |
</ul> |
OlderNewer