Skip to content

Instantly share code, notes, and snippets.

View cwsaylor's full-sized avatar

Chris Saylor cwsaylor

View GitHub Profile
@cwsaylor
cwsaylor / index.html.slim
Created October 13, 2014 20:41
Twitter Bootstrap Sample Home Page
.jumbotron
h1 Lorem Ipsum
p Nunc auctor bibendum eros. Maecenas porta accumsan mauris. Etiam enim enim, elementum sed, bibendum quis, rhoncus non, metus. Fusce neque dolor, adipiscing sed, consectetuer et, lacinia sit amet, quam. Suspendisse wisi quam, consectetuer in, blandit sed, suscipit eu, eros. Etiam ligula enim, tempor ut, blandit nec, mollis eu, lectus. Nam cursus. Vivamus iaculis. Aenean risus purus, pharetra in, blandit quis, gravida a, turpis. Donec nisl. Aenean eget mi. Fusce mattis est id diam. Phasellus faucibus interdum sapien. Duis quis nunc. Sed enim.
p = link_to "Get Started", new_user_registration_path, class: "btn btn-lg btn-primary"
@cwsaylor
cwsaylor / navbar.html.slim
Last active August 29, 2015 14:07
Twitter Bootstrap Slim Navbar
nav.navbar.navbar-default[role="navigation"]
.container-fluid
.navbar-header
button.navbar-toggle.collapsed[type="button" data-toggle="collapse" data-target="#navbar-collapse"]
span.sr-only
| Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
= link_to "changeme", root_path, class: "navbar-brand"
@cwsaylor
cwsaylor / application.html.slim
Last active August 29, 2015 14:07
Twitter Bootstrap Application Template
doctype html
html[lang="en"]
head
meta[charset="utf-8"]
meta[name="viewport" content="width=device-width, initial-scale=1.0"]
title = content_for?(:title) ? yield(:title) : "changeme"
= stylesheet_link_tag "application"
= csrf_meta_tags
body
.container
@cwsaylor
cwsaylor / styleguide.html.erb
Last active August 29, 2015 14:07
Twitter Bootstrap Styleguide
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<h1>Hello, world!</h1>
<p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a href="#" class="btn btn-primary btn-lg" role="button">Learn more &raquo;</a></p>
</div>
<h1>Buttons</h1>
<p>
/*!
Holder - client side image placeholders
Version 2.4.0+bxlim
© 2014 Ivan Malopinsky - http://imsky.co
Site: http://imsky.github.io/holder
Issues: https://github.com/imsky/holder/issues
License: http://opensource.org/licenses/MIT
# USAGE:
# gem install rails
# gem install attr_encrypted
# edit mysql connection parameters
# edit attr_encrypted line and update PUT KEY HERE
require "rubygems"
require "active_record"
require "attr_encrypted"
doctype html
html[lang="en"]
head
meta[charset="utf-8"]
meta[name="viewport" content="width=device-width, initial-scale=1.0"]
title = content_for?(:title) ? yield(:title) : "CHANGEME"
= stylesheet_link_tag "application"
= javascript_include_tag "vendor/modernizr"
= csrf_meta_tags
body
@cwsaylor
cwsaylor / heroku_dupe_collab.sh
Created April 17, 2014 21:15
Duplicates the collaborators from one heroku env to another
#!/usr/bin/env sh
# Usage: ./heroku_dupe_collab.sh source-env target-env
for arg in $(heroku sharing -a $1 | grep -v "===" | awk '{print $1}')
do
heroku sharing:add $arg -a $2
done
@cwsaylor
cwsaylor / Default (OSX).sublime-keymap
Created March 29, 2014 05:33
To use these shortcuts in Sublime, click the menu items: Sublime Text -> Preferences -> Key Bindings - User and copy and paste the following settings.
[
{ "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar"}
]
@cwsaylor
cwsaylor / Preferences.sublime-settings
Last active August 29, 2015 13:57
To use these settings in Sublime, click the menu items: Sublime Text -> Preferences -> Settings - User and copy and paste the following settings.
{
"check_for_bundler": true,
"check_for_rbenv": true,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"detect_indentation": false,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.a",
"*.class",