Skip to content

Instantly share code, notes, and snippets.

View trey's full-sized avatar
🏠
I'd rather be at home

Trey Piepmeier trey

🏠
I'd rather be at home
View GitHub Profile
@trey
trey / FormFanciness.css
Created December 3, 2010 00:47
Some nice basic text input and textarea styling
input[type=text],
textarea { padding: 7px 5px 7px 8px; border: 1px solid #999; }
input[type=text]:focus,
textarea:focus { border-color: #000; border-color: #000; border-width: 1px; border-left-width: 3px; padding-left: 6px; }
input[type=text] { width: 300px; }
input.error,
input.error:focus,
textarea.error,
textarea.error:focus { border-color: red; }
label { display: block; margin: 10px 0 0; font-weight: bold; font-size: 13px;}
@wyattdanger
wyattdanger / base.sh
Created December 13, 2010 16:41 — forked from jamessanders/base.sh
# change directory to the base of your project
# Your project base is the directory that contains
# either _darcs or .git or .hg
# to use as a command add to .zshrc or .bashrc
# alias base='source <path/to/base.sh>
CUR=$(pwd);
while [ ! "$CUR" = "/" ]
@trey
trey / mixins.sass
Created December 28, 2010 22:53
Clever Sass Mixins
// @include rounded(25px)
@mixin rounded($radius)
-webkit-border-radius: $radius
-moz-border-radius: $radius
border-radius: $radius
@mixin rounded-tl($radius)
-moz-border-radius-topleft: $radius
-webkit-border-top-left-radius: $radius
border-top-left-radius: $radius
@penguinboy
penguinboy / Object Flatten
Created January 2, 2011 01:55
Flatten javascript objects into a single-depth object
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;
@protocool
protocool / caveatPatchor.js
Created February 14, 2011 02:29
Sample caveatPatchor.js file for use in Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@jcroft
jcroft / grid.sass
Created March 21, 2011 18:09
The grid component from my personal front-end framework. Brief demo here: http://jeffcroft.com/static/misc/grid_frameworks.mov
// REQUIRED VARS. Defaults to a 950px wide, 24-column grid that has 30px wide units and 10px wide
// gutters. If you do the fluid grid, then this 950/24/30/10px size will become the maximum size.
$grid_type: fixed !default
$grid_columns: 24 !default
$grid_column_width: 30 !default
$grid_gutter_width: 10 !default
// GENERATED VARS. You can ignore these.
$grid_full_width: $grid_columns * $grid_column_width + $grid_columns * $grid_gutter_width - $grid_gutter_width
$grid_column_width_percent: ($grid_column_width / $grid_full_width * 100) * 1%
https://github.com/myemma
https://github.com/emmadesign
https://github.com/emmaux
https://github.com/imustbuild
https://github.com/zenworm
https://github.com/trey
https://github.com/geoffa
https://github.com/geoffalday
https://github.com/jairoglyph
@jeresig
jeresig / .vimrc
Created May 4, 2011 16:46
VIM Config
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
set nocompatible
set autoindent
set tabstop=2
set showmatch
set vb t_vb=
set ruler
set nohls
set incsearch
syntax on
@nesquena
nesquena / caveatPatchor.js
Created May 17, 2011 00:37
propane_extensions
/*
As of version 1.1.2, Propane will load and execute the contents of
~/Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@gruber
gruber / gist:1063605
Created July 4, 2011 16:48
Simple Inbox Archiving Script for Apple Mail
-- See article here: http://daringfireball.net/2007/07/simple_inbox_sweeper
-- The following should be one long line:
set _description to "All unflagged, read messages in each IMAP account
inbox will be moved to the “Archive” mailbox corresponding to that
account. This action is not undoable."
tell application "Mail"
display alert "Archive read messages from IMAP inboxes?" buttons ¬
{"Cancel", "Archive"} cancel button 1 message _description