Skip to content

Instantly share code, notes, and snippets.

View trey's full-sized avatar
🐢
Slow and steady

Trey Piepmeier trey

🐢
Slow and steady
View GitHub Profile
@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
@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 / 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;}
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@trey
trey / wp-config.php
Created March 8, 2010 21:16
Flexible WordPress Configuration
define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content' );
define('WP_CONTENT_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content');
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME'] . '');
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wordpress');
/* More info: http://solutions.treypiepmeier.com/2008/05/28/installing-wordpress-the-right-way/ */
@trey
trey / requirements.txt
Created March 5, 2010 04:53
PIP requirements file for ComicBinder
docutils==0.6
django-tagging
sorl-thumbnail
django-gravatar
django-debug-toolbar
PIL
-e hg+http://bitbucket.org/ubernostrum/django-registration/#egg=Registration
-e git://github.com/mintchaos/typogrify.git#egg=Typogrify
-e git://github.com/simonw/django-html.git#egg=django_html
-e svn+http://code.djangoproject.com/svn/django/trunk#egg=Django

Django Enviroment Setup on Mac OSX 10.6.2 (Snow Leopard)

Install Homebrew

sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
brew install git
cd /usr/local
git init
@trey
trey / treyvhost
Created February 1, 2010 21:06
Create a new project based on my site-template project.
#!/bin/sh
# Original script by Jason Tan: http://solutions.treypiepmeier.com/2009/03/03/virtual-hosts-on-osx-leopard/#comment-41787
DIR=/Users/$SUDO_USER/Sites/$1
if [[ ! -d $DIR && `id -u` -eq 0 ]]; then
echo ""
echo "Downloading site-template repository ..."
sudo -u $SUDO_USER git clone --quiet git://github.com/trey/site-template.git $DIR
cd $DIR
@postpostmodern
postpostmodern / 404.html
Last active February 20, 2022 01:34
My custom configurations for apache 2.2
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Not Found</title>
<style type="text/css" media="screen">
body {
background: #f0f0f0;
font: normal 18px sans-serif;
width: 400px;
@trey
trey / YQL
Created November 7, 2009 07:42
How beards.trey.cc works. Be sure to note the YQL snippet at the bottom. Make your own at http://developer.yahoo.com/yql/console/
use 'http://yqlblog.net/samples/data.html.cssselect.xml' as data.html.cssselect; select * from data.html.cssselect where url="http://whiskerino.org/2009/beards/trey/favorites/" and css="#gallerywidemouth div"