Skip to content

Instantly share code, notes, and snippets.

View cwsaylor's full-sized avatar

Chris Saylor cwsaylor

View GitHub Profile
create table `fizzbuzz` (
`id` int(11) NOT NULL AUTO_INCREMENT,
primary key (`id`)
) auto_increment=1;
create procedure insertNumbers(max int)
begin
end;
@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",
@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 / 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
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
# 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"
/*!
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
@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>
@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 / 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"