Skip to content

Instantly share code, notes, and snippets.

; EditorConfig is awesome: http://EditorConfig.org
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
@ebinion
ebinion / sublime-user-settings
Last active August 29, 2015 14:13
Sublime User Settings
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"caret_style": "phase",
"ensure_newline_at_eof_on_save": true,
"font_size": 14,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
Alabama
Alaska
Arizona
Arkansas
California
Colorado
Connecticut
Delaware
Florida
Georgia
@ebinion
ebinion / HTML Ipsum.haml
Created December 24, 2013 10:29
Haml HTML ipsum.
%h1 HTML Ipsum Presents
%h2 Test text, this will likely wrap a few lines to ensure we can test the line height
%h3 Test text, this will likely wrap a few lines to ensure we can test the line height
%h4 Test text, this will likely wrap a few lines to ensure we can test the line height
%h5 Test text, this will likely wrap a few lines to ensure we can test the line height
%h6 Test text, this will likely wrap a few lines to ensure we can test the line height
%p <strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim a
@ebinion
ebinion / Vertical Grid Overlay.coffee
Last active January 1, 2016 07:09
Someday I'll turn this into a Chrome Extension ... just not today
window.GridOverlay = (vHeight = 18, canvasId = "gridOverlayCanvas")->
window.console.log("working")
new_canvas = document.createElement("canvas")
new_context = new_canvas.getContext("2d")
new_canvas.id = canvasId
this.setCanvasDimensions = ->
new_canvas.width = document.body.offsetWidth
new_canvas.height = document.body.offsetHeight
@ebinion
ebinion / Responsive Viewport Meta Tag.html
Last active January 1, 2016 06:59
Because I always end up searching for it.
<meta name="viewport" content="width=device-width, initial-scale=1">
@ebinion
ebinion / Rails Gemfile.rb
Last active January 1, 2016 06:09
A Gemfile that I use for Rails 4 projects deployed on Heroku.
source 'https://rubygems.org'
ruby "2.0.0"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
@ebinion
ebinion / Vagrantfile
Created July 15, 2013 03:22
Configuration file for Vagrant virtual machine.
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
echo 'export LC_ALL=en_US.UTF-8' >> /etc/bash.bashrc
echo 'export LANG=en_US.UTF-8' >> /etc/bash.bashrc
echo 'export LANGUAGE=en_US.UTF-8' >> /etc/bash.bashrc
echo 'export RAILS_ENV=production' >> /etc/bash.bashrc
SCRIPT
@ebinion
ebinion / gist:5690817
Last active March 3, 2016 17:23
Update Postgres "template1"
UPDATE pg_database SET datallowconn = TRUE where datname = 'template0';
\c template0
UPDATE pg_database SET datistemplate = FALSE where datname = 'template1';
drop database template1;
create database template1 with template = template0 encoding = 'UNICODE' LC_CTYPE = 'en_US.UTF-8' LC_COLLATE = 'C';
UPDATE pg_database SET datistemplate = TRUE where datname = 'template1';
\c template1
UPDATE pg_database SET datallowconn = FALSE where datname = 'template0';
@ebinion
ebinion / Wordpress Edited Nav Menu Walker Class.php
Last active December 16, 2015 18:39
Custom walker for nav menus, I personally don't like having a million classes added to my html. So all the fluff is cut. You'll still have access to the menu classes added in the admin menu, 'current-menu-item', and 'menu-item.' It's basically a modified version of the built-in Walker.
<?php
// Custom walker for nav menus, I personally don't like having a million classes added to my html. So all the fluff is cut. You'll still have access to the menu classes added in the admin menu, 'current-menu-item', and 'menu-item'
class ECB_Walker_Nav_Menu extends Walker {
/**
* @see Walker::$tree_type
* @since 3.0.0
* @var string
*/
var $tree_type = array( 'post_type', 'taxonomy', 'custom' );