Skip to content

Instantly share code, notes, and snippets.

@tbonemalone
tbonemalone / gist:2860373
Created June 2, 2012 22:53
html:meta:viewport tag
<snippet>
<content><![CDATA[
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>meta:viewport</tabTrigger>
</snippet>
@tbonemalone
tbonemalone / .vimrc.local
Last active January 2, 2016 05:49
Local vim setting for use with [Maximum Awesome](https://github.com/square/maximum-awesome)
set nocursorline " don't highlight current line
set hlsearch "hilight search matches
set shiftround " When at 3 spaces and hit >> go to 4 not 5
"Press space to toggle highlight on/off, and show current value
nnoremap <Space> :set hlsearch! hlsearch?<CR>
"Switch between the last two files
nnoremap <leader><leader> <c-^>
@tbonemalone
tbonemalone / gist:8386123
Last active January 3, 2016 00:59
Quick notes on rolling quick authentication for a simple rails app. Crat

This is a distilation for how to roll a simple authentication system in Rails 3.

Excellent Sources:
RailsTutorials.org
RailsCasts Episode #250

  1. Add bcrypt-ruby gem and bundle
  2. Generate controller
    1. rails g controller users
  • Note: controllers are named plural by convention
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
(function(){