Skip to content

Instantly share code, notes, and snippets.

View JohnLockwood's full-sized avatar
💭
Organizing repos 🔢

John Lockwood JohnLockwood

💭
Organizing repos 🔢
View GitHub Profile
@JohnLockwood
JohnLockwood / application.html.erb
Created November 10, 2012 17:39
Translating applicaiton.html.erb to HAML -- this file is translated with modifications in https://gist.github.com/4051775
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= content_for?(:title) ? yield(:title) : "Rails3 Mongoid Devise" %></title>
<meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Rails3 Mongoid Devise" %>">
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
@JohnLockwood
JohnLockwood / application.html.haml
Created November 10, 2012 17:15
A sample application.html.haml file, based on the application.html.erb from ruby-devise-mongoid.
!!!
%head
%title= content_for?(:title) ? yield(:title) : I18n.t("site_title")
%meta{:name => "description", :content=> "#{ content_for?(:description) ? yield(:description) : (I18n.t "site_description")}"}
%meta{:charset => "utf-8"}
%meta{:author => "John Lockwood"}
=stylesheet_link_tag "application", :media => "all"
=javascript_include_tag "application"
=csrf_meta_tags
= yield(:head)
@JohnLockwood
JohnLockwood / git_tasks.rake
Created November 4, 2012 15:31
Some Rake Tasks to Automate Common Git Tasks -- I use this at johnlockwood.com.
# Use rake --tasks | grep git for a list
# The most useful is rake git:checkin, which is essentially add + commit + message + push.
namespace :git do
desc "Run ssh-add to enter password for your ssh key a single time"
task :setup do
sh "ssh-add"
end