Discover gists
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
it "should create when dirty" do | |
pending | |
lambda do | |
Zoo.new(:city => "San Diego").save | |
end.should change(Zoo, :all).by(1) | |
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
<?php | |
class CommunitiesController extends AppController{ | |
/** | |
* undocumented function | |
* | |
* @return void | |
* @access public | |
*/ | |
function index() { | |
$communities = $this->Community->find('all'); |
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
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 | |
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
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 |
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
(loop for x from 1 to 10 do (print x)) |
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
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" ) |
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
# | |
# 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 |
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
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/web/cylenceweb | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> |
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
<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> |
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
<VirtualHost *:80> | |
ServerName dropbox.cylenceweb.com | |
DocumentRoot /opt/dropbox | |
<Directory "/opt/dropbox"> | |
Options Indexes FollowSymLinks | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> |