Skip to content

Instantly share code, notes, and snippets.

View RubyRonin's full-sized avatar

Ruby Ronin RubyRonin

View GitHub Profile
@RubyRonin
RubyRonin / gist:ecd98716138b8a1b382c
Created May 16, 2014 04:06
Using Devise to sign out
<% if user_signed_in? %>
Signed in as <% current_user.email %>. Not You?
<%= link_to "Sign Out", destroy_user_session_path %>
<% else %>
<%= link_to "Sign In", new_user_session_path %>
<% end %>
Returns this era
No route matches [GET] "/users/sign_out"
@RubyRonin
RubyRonin / stripe.rb
Created May 19, 2014 05:56
My stripe.rb file found in config/initializers/stripe.rb:
Rails.configuration.stripe = {
:publishable_key => ENV['PUBLISHABLE_KEY'],
:secret_key => ENV['SECRET_KEY']
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]
Rails.configuration.stripe = {
:publishable_key => ['pk_foo'],
:secret_key => ['sk_bar']
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]
greetings all. attempting to play the current time into a variable, so everytime I call said variable it returns the current time
clock = Time.new
This returns the time when the variable was created. How do I return the current time when the variable is called?
@RubyRonin
RubyRonin / gist:e3f10e0b125f1c2ac998
Created September 6, 2014 20:14
gem install error
Errno::ECONNREFUSED: Connection refused - connect(2) for "your-dns-needs-immediate-attention.network"
C:\Users\Zanzibar\Desktop\rubyprojects\pgapp>git status
warning: LF will be replaced by CRLF in config/routes.rb.
The file will have its original line endings in your working directory.
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
# (use "git push" to publish your local commits)
#
# Changes to be committed:
@RubyRonin
RubyRonin / the routes file
Created December 6, 2014 08:09
routes.rb
Rails.application.routes.draw do
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
root 'public/index.html'
# Example of regular route:
# get 'products/:id' => 'catalog#view'
@RubyRonin
RubyRonin / gist:64834e15d684dea59609
Created December 18, 2014 13:47
child theme style.css
/*
Theme Name: Twenty Fourteen Child
Theme URI: http://localhost/twenty-fourteen-child/
Description: Twenty Fourteen Child Theme
Author: John Doe
Author URI: http://localhost
Template: twentyfourteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
get_header(); ?>
<div class="col-md-12 intro-me clearfix">
<h2> <?php echo ft_of_get_option('fabthemes_welcome_title'); ?></h2>
<p> <?php echo ft_of_get_option('fabthemes_welcome_text'); ?> </p>
</div>
<div id="primary" class="content-area ">
<main id="main" class="site-main" role="main">
<!-- my loop for songs -->
<div class="row clearfix">
<div class="col-md-2 column">
<img src="https://i4.sndcdn.com/artworks-000058923387-31sii8-t50x50.jpg" >
</div>
<div class="col-md-6 column">
<h3>Song Title Term Goes Here</h3>
<h4>Artist Name Term Goes Here</h4>
</div>
<div class="col-md-2 column">