This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Event.onReady(function() { | |
$$('textarea').each(function(inputElement) { | |
var textarea = inputElement; | |
var initialHeight = textarea.getHeight(); | |
var currentHeight = -1; | |
var currentTimer = false; | |
var div = $div({id: textarea.id + '_hidden'}); | |
textarea.insert({'after': div}); | |
div.setStyle({'display' : 'none', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export RAILS_ENV='development' | |
export GEM_HOME='/opt/gems' | |
export GEM_PATH='/opt/gems' | |
PATH='/opt/ruby/current/bin:/opt/gems:/opt/gems/bin:/opt/nginx/current/sbin:/opt/git/current/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin' | |
function nginx_start() { | |
sudo /opt/nginx/sbin/nginx | |
} | |
function nginx_reload() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
pid /opt/nginx/logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
passenger_root /opt/gems/gems/passenger-2.2.9; | |
passenger_ruby /opt/ruby/nginx_wrapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WGET_V=1.11.4 | |
RUBY_V=1.8.7-2010.01 | |
RUBY_REL=68719 | |
NGINX_V=0.8.32 | |
GIT_V=1.6.5.5 | |
GIT_USER=dirkkelly | |
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Export specific models to yaml" | |
task :export => :environment do | |
require 'fileutils' | |
begin | |
# Returns only the specified models, unless they're not defined | |
models = ENV['MODELS'].split(',').map { |m| m.pluralize.classify.constantize } | |
rescue | |
# Returns all models minus the subclasses of Page | |
models = (ActiveRecord::Base.send(:subclasses) - Page.send(:subclasses)).map { |m| m.name.constantize } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compass/_support *************************************** | |
// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both. | |
$legacy-support-for-ie: true !default | |
// Setting this to false will result in smaller output, but no support for ie6 | |
$legacy-support-for-ie6: $legacy-support-for-ie !default | |
// Setting this to false will result in smaller output, but no support for ie7 | |
$legacy-support-for-ie7: $legacy-support-for-ie !default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProductPage < Page | |
cattr_accessor :allowed_children | |
@@allowed_children = [Page,ArchivePage] | |
layout 'product' | |
field 'price' | |
part 'body' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Shop | |
module Models | |
module Page | |
def self.included(base) | |
base.class_eval do | |
# Returns the field with the name passed. | |
# If a second parameter is passed the field content will be updated | |
def field(name,*args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Version | |
named_scope :drafts, :conditions => { :draft => true } | |
named_scope :published, :conditions => { :draft => false } | |
end | |
Version.drafts # all drafts | |
Version.published # all published |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
something_awesome: | |
extension: mail | |
field: | |
from: contact[email] | |
recipients: [email protected] | |
<form> | |
<input name="contact[email]" /> | |
</form> |
OlderNewer