Skip to content

Instantly share code, notes, and snippets.

View Ravenna's full-sized avatar

Ravenna Ravenna

View GitHub Profile
<div id="event_calendar">
<link rel="stylesheet" type="text/css" href="<?php if(!is_admin()){bloginfo('template_url');} ?>/styles/fullcalendar.css"/>
<script type="text/javascript" src="<?php if(!is_admin()){bloginfo('template_url');} ?>/scripts/fullcalendar.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
<?php
// Please specify your Mail Server - Example: mail.yourdomain.com.
ini_set("SMTP","gwa1.webcontrolcenter.com");
// Please specify an SMTP Number 25 and 8889 are valid SMTP Ports.
ini_set("smtp_port","25");
// Please specify the return address to use
<?php
/*
Template Name: Events
*/
?>
<?php get_header();?>
<div id="int_subhead">
<p class="sub_head_title century">EVENTS</p>
@Ravenna
Ravenna / gist:1298878
Created October 19, 2011 16:41
Terminal Output
=> Booting WEBrick
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require': no such file to load -- rails/init.rb (LoadError)
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
@Ravenna
Ravenna / functions.php
Created October 21, 2011 16:01
functions.php
<?php
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 150, 150, true);
add_action('init', 'company_register');
@Ravenna
Ravenna / gist:1373911
Created November 17, 2011 17:57
mailer send
class Weapon < ActiveRecord::Base
belongs_to :zombie
before_save :check_ammo
def check_ammo
if self.ammo == 3
WeaponMailer.check_ammo(self, self.zombie).deliver
@Ravenna
Ravenna / gist:1377351
Created November 18, 2011 18:44
cap bundler error
* executing "cd /home/emeraldcityguitars/emeraldcityguitars.com/releases/20111117233533 && bundle install --gemfile /home/emeraldcityguitars/emeraldcityguitars.com/releases/20111117233533/Gemfile --path /home/emeraldcityguitars/emeraldcityguitars.com/shared/bundle --deployment --quiet --without development test"
servers: ["blackhawks.dreamhost.com"]
[blackhawks.dreamhost.com] executing command
*** [err :: blackhawks.dreamhost.com] sh: bundle: command not found
command finished in 76ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/emeraldcityguitars/emeraldcityguitars.com/releases/20111117233533; true"
servers: ["blackhawks.dreamhost.com"]
[blackhawks.dreamhost.com] executing command
command finished in 95ms
@Ravenna
Ravenna / gist:1383514
Created November 21, 2011 18:46
log output
* executing "cd /home/emeraldcityguitars/emeraldcityguitars.com/releases/20111121184155 && bundle install --gemfile /home/emeraldcityguitars/emeraldcityguitars.com/releases/20111121184155/Gemfile --path /home/emeraldcityguitars/emeraldcityguitars.com/shared/bundle --deployment --quiet --without development test"
servers: ["blackhawks.dreamhost.com"]
[blackhawks.dreamhost.com] executing command
*** [err :: blackhawks.dreamhost.com] sh: bundle: command not found
command finished in 68ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/emeraldcityguitars/emeraldcityguitars.com/releases/20111121184155; true"
servers: ["blackhawks.dreamhost.com"]
[blackhawks.dreamhost.com] executing command
command finished in 102ms
@Ravenna
Ravenna / gist:1384046
Created November 21, 2011 21:43
production.rb
set :user, 'emeraldcityguitars'
#This is to help with the deployment
set :domain, 'emeraldcityguitars.com'
set :deploy_to, "/home/#{user}/#{domain}"
set :use_sudo, false
role :app, "blackhawks.dreamhost.com"
@Ravenna
Ravenna / gist:1384042
Created November 21, 2011 21:42
deploy.rb
require 'capistrano/ext/multistage'
require 'bundler/capistrano'
set :application, "Emerald City Guitars"
set :repository, "git://github.com/Ravenna/ecg.git"
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
# set :deploy_to, "/var/www/#{application}"