Skip to content

Instantly share code, notes, and snippets.

@bpainter
bpainter / hamstache.haml
Created November 3, 2011 20:41
Haml + Mustache
.content{{css.id}}
or
%img{:src => "{{img.src}}", :alt => "{{img.alt}}"}
@bpainter
bpainter / .bash_profile
Created October 26, 2011 15:48
Bash file for handy GIT integration, dependent on git-completion.bash
# Add commit messages with Sublime
export EDITOR='subl -w'
# GIT super shortcuts
alias ga='git add'
alias gp='git pull'
alias gps='git push'
alias gc='git commit -a'
alias gcm='git commit -m'
@bpainter
bpainter / accessible-forms.haml
Created October 7, 2011 18:19
Experimenting with accessible forms, markup that's extensible for varied types of form layout, and with enough hooks to make validation simpler.
// options for :class to handle different form layouts
// horizontal-labels - default
// vertical-lables
// overlay-labels
%form{:id => "", :name => "", :class => "", :action => "", :method => "post", "accept-charset" => "utf-8", "aria-role" => "form", "aria-live" => "polite", "aria-atomic" => "false"}
%fieldset{:id => "", :class => ""}
%legend
%h3 Basic Input Fields
@bpainter
bpainter / arrows.scss
Created July 15, 2011 19:08
Sass mixin for arrows based on The Shapes of CSS from Chris Coyier http://css-tricks.com/examples/ShapesOfCSS/
// --------------------------------------------------------
// arrows
// --------------------------------------------------------
// $direction: top, left, right, bottom, top-left, top-right, bottom-left, bottom-right
// $color: hex, rgb or rbga
// $size: px or em
// @example
// .element{
// @include arrow(top, #000, 50px);
// }