Skip to content

Instantly share code, notes, and snippets.

@atinypixel
atinypixel / reset.sass
Created February 3, 2009 06:49
Eric Meyer's Reset CSS (using sass)
/*
Reset
By Eric Meyers
PURPOSE:
Resets everything to zero for better browser compatibility
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, p, blockquote, pre, a,
abbr, acronym, address, big, cite, code, small, strike, strong, sub, sup, tt, var,
#
# Inspired by
# http://dev.rubyonrails.org/svn/rails/plugins/account_location/lib/account_location.rb
#
module SubdomainAccounts
def self.included( controller )
controller.helper_method(:account_domain, :account_subdomain, :account_url, :current_account, :default_account_subdomain, :default_account_url)
end
protected
@atinypixel
atinypixel / gist:52561
Created January 25, 2009 22:00 — forked from dhh/gist:45076
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName example.com
# ServerAlias *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
@atinypixel
atinypixel / grow_text_area.js
Created January 17, 2009 06:29
Automatically grow your textarea inputs
// USAGE EXAMPLE (in HTML)
// <script type="text/javascript">
// new ResizingTextArea("dom_id_for_textarea_here");
// </script>
var ResizingTextArea = Class.create();
ResizingTextArea.prototype = {
defaultRows: 2,
<small><ul>
<% @curators.each do |member| %>
<li><%= member.person.name %></li>
<% end %>
</ul></small>
/* You can use any element aside from the example below.
How it works is that you simply create .hover, .active styles
for whatever element you use this on. Works very well. Uses
the underscore hack to targe ie6.
*/
input, button {
_azimuth: expression(
this.onmousedown = this.onmousedown || new Function("this.className += ' active'"),
this.onmouseup = this.onmouseup || new Function("this.className = this.className.replace('active','')"),