Skip to content

Instantly share code, notes, and snippets.

View adamjgrant's full-sized avatar

Adam Grant adamjgrant

  • Software Engineer
View GitHub Profile
@adamjgrant
adamjgrant / Fullpage.html
Created May 11, 2012 20:48
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Snap transition &middot; CodePen</title>
<style>
@adamjgrant
adamjgrant / Fullpage.html
Created May 11, 2012 20:48
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Snap transition &middot; CodePen</title>
<style>
@adamjgrant
adamjgrant / gist:5338930
Created April 8, 2013 17:56
Namespacing a bootswatch file
// Amelia 2.3.1
// Bootswatch
// -----------------------------------------------------
// TYPOGRAPHY
// -----------------------------------------------------
@import url('//fonts.googleapis.com/css?family=Lobster|Cabin:400,700');
<a href="#" class="btn">
<i class="custom-icon-excel"></i>
&nbsp;PDF
</a>
@adamjgrant
adamjgrant / gist:5765827
Created June 12, 2013 14:34
database.yml
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
Adams-MacBook-Pro:surveyrunner adamkochanowicz$ gem install surveyor
WARN: Unresolved specs during Gem::Specification.reset:
rake (>= 0.8.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Fetching: surveyor-1.4.0.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
Adams-MacBook-Pro:surveyrunner adamkochanowicz$ rails server
/Users/adamkochanowicz/.rvm/gems/ruby-2.0.0-p195/gems/sqlite3-1.3.7/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.4.0]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
####### config/routes.rb
match 'surveys/edit/new' => 'surveys#new'
####### ..controllers/surveys_controller.rb
class SurveysController < ApplicationController
def index
@surveys = Survey.all
###### routes.rb
resources :surveys do
resources :questions do
resources :responses
end
end
###### questions/new.html.erb
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000