Skip to content

Instantly share code, notes, and snippets.

it "should create when dirty" do
pending
lambda do
Zoo.new(:city => "San Diego").save
end.should change(Zoo, :all).by(1)
end
<?php
class CommunitiesController extends AppController{
/**
* undocumented function
*
* @return void
* @access public
*/
function index() {
$communities = $this->Community->find('all');
def self.find_by_permalink(link)
cat = nil
if link.to_i == 0
cat = Category.find_by_name(link.gsub(/ /, "-").titlecase)
else
cat = Category.find(link)
end
def yui_js(arr)
defaults = [ 'yahoo-dom-event/yahoo-dom-event' ]
base = 'http://yui.yahooapis.com/combo?'
prefix = '2.5.2/build/'
src = base + (defaults + arr).uniq.map { |s| prefix + s }.join('&') + '.js'
%|<script type="text/javascript" src="#{src}"></script>|
end
(loop for x from 1 to 10 do (print x))
server.port = 3000
# server.errorlog = CWD + "/log/lighttpd.error.log"
# accesslog.filename = CWD + "/log/lighttpd.access.log"
server.modules = ( "mod_rewrite",
"mod_access",
"mod_fastcgi",
"mod_userdir",
"mod_accesslog" )
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/web/cylenceweb
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<VirtualHost *:80>
ServerName blog.cylenceweb.com
DocumentRoot /var/www/web/blog
<Directory "/var/www/web/blog">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
ServerName dropbox.cylenceweb.com
DocumentRoot /opt/dropbox
<Directory "/opt/dropbox">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>