Skip to content

Instantly share code, notes, and snippets.

cdesch cdesch

Block or report user

Report or block cdesch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View User.activeadmin.rb
#ActiveAdmin User
ActiveAdmin.register User do
index do
column :email
column :alias
column :current_sign_in_at
column :last_sign_in_at
column :sign_in_count
default_actions
end
View Entry Thumbnail
<% entry = @featured_entries.first %>
<article class="entry style-grid style-hero hero-sm-largest type-post col-sm-12 col-md-6 colheight-sm-1 colheight-md-2 colheight-lg-2 colheight-xl-2">
<div class="ribbon ribbon-pulled ribbon-small ribbon-highlight">
<%= link_to entry.category.try(:name), entry.category %>
</div>
<header class="entry-header">
<h3 class="entry-title"><%= link_to entry.title, entry %></h3>
View socialLoginError
cjs-MacBook-Pro-4:myapp cj$ bundle exec rake --tasks --trace
rake aborted!
undefined method `each' for nil:NilClass
/Users/cj/RubymineProjects/myapp/config/application.rb:24:in `<class:Application>'
/Users/cj/RubymineProjects/myapp/config/application.rb:10:in `<module:myapp>'
/Users/cj/RubymineProjects/myapp/config/application.rb:9:in `<top (required)>'
/Users/cj/RubymineProjects/myapp/Rakefile:4:in `require'
/Users/cj/RubymineProjects/myapp/Rakefile:4:in `<top (required)>'
/Users/cj/.rvm/gems/ruby-2.0.0-p247@myapp/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load'
/Users/cj/.rvm/gems/ruby-2.0.0-p247@myapp/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load_rakefile'
View application.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
#Bundler.require(:default, Rails.env)
module MyApp
class Application < Rails::Application
View social_keys.yml
development:
facebook_key: "MyKeyRemoved"
facebook_secret: "MyKeyRemoved"
twitter_key: "YOUR_KEY"
twitter_secret: "YOUR_SECRET"
github_key: "YOUR_KEY"
github_secret: "YOUR_SECRET"
View Code
def index
@events = Event.where("published == ? AND event_date >= ?", true, DateTime.now.beginning_of_day).order('event_date ASC').limit(6)
end
View Error
Started GET "/admin/events/3/edit" for 127.0.0.1 at 2014-06-18 09:35:45 -0400
Processing by Admin::EventsController#edit as HTML
Parameters: {"id"=>"3"}
AdminUser Load (0.2ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 ORDER BY "admin_users"."id" ASC LIMIT 1
Event Load (0.1ms) SELECT "events".* FROM "events" WHERE "events"."id" = ? LIMIT 1 [["id", "3"]]
Event Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."id" = 3 ORDER BY "events"."id" ASC LIMIT 1
Type Load (0.2ms) SELECT "types".* FROM "types"
Type Load (0.2ms) SELECT "types".* FROM "types" WHERE "types"."id" = ? ORDER BY "types"."id" ASC LIMIT 1 [["id", 2]]
Category Load (0.1ms) SELECT "categories".* FROM "categories"
Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? ORDER BY "categories"."id" ASC LIMIT 1 [["id", 2]]
View event.rb
ActiveAdmin.register Event do
index do
column :title
column :short_description
column :event_date
column :published
column :type
column :category
@cdesch
cdesch / docs.html
Created Jul 31, 2014
Google Docs Comic 1
View docs.html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css">
<script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
<body>
<div style="max-width:900px; -webkit-transform:rotate(0deg)">
<scene id="scene1">
<label t="translate(0,346)">
@cdesch
cdesch / comic.html
Created Jul 31, 2014
Google Doc Comic 2
View comic.html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css">
<script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
<body>
<div style="max-width:900px; -webkit-transform:rotate(0deg)">
<scene id="scene1">
<label t="translate(0,346)">
You can’t perform that action at this time.