This file contains hidden or 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
require 'ostruct' | |
class BugMash | |
# Prizes last updated 2009-08-07 12:04pm PDT | |
# http://wiki.railsbridge.org/projects/railsbridge/wiki/BugMash?version=41 | |
def prizes | |
[ | |
OpenStruct.new(:sponsor => "Jeff Cohen", :prize => "$100-off coupon code for any public Purple Workshops workshop"), | |
OpenStruct.new(:sponsor => "Mike Mangino", :prize => "Developing Facebook Platform Applications with Rails"), | |
OpenStruct.new(:sponsor => "Mike Gunderloy", :prize => "Rails Rescue Handbook"), |
This file contains hidden or 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 total_hours_for_issue_for_date_range(issue, user, date_from, date_to) | |
- current_date = date_from | |
- total = 0.0 | |
- while current_date <= date_to | |
- hours = total_hours_for_user_on_day(issue, user, current_date) | |
- total += hours unless hours.nil? | |
- current_date += 1 | |
- end | |
- total | |
+ (date_from.to_date..date_to).inject(0.0) {|sum, day| |
This file contains hidden or 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
-- phpMyAdmin SQL Dump | |
-- version 2.11.8.1deb5 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: Jul 08, 2009 at 03:17 PM | |
-- Server version: 5.0.51 | |
-- PHP Version: 5.2.6-1+lenny2 | |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
This file contains hidden or 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 RailsTutorLayoutHook < Redmine::Hook::ViewListener | |
# Add a CSS menu link | |
def view_layouts_base_html_head(context = { }) | |
return stylesheet_link_tag "budget.css", :plugin => "redmine_rails_tutor", :media => "screen" | |
end | |
end |
This file contains hidden or 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
## vendor/plugins/redmine_dana/init.rb | |
require 'redmine' | |
Redmine::Plugin.register :redmine_hide_projects do | |
name 'Hide Projects' | |
author 'Dana Jones' | |
url 'http://www.sterlingrosedesign.com/' | |
author_url 'http://www.sterlingrosedesign.com/' | |
description 'The Redmine Hid Projects plugin is used to hide the projects link at the top of the |
This file contains hidden or 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
en: | |
burndown: "Burndown" | |
burndown_text_no_sprint: "There is no current Sprint for this Project" |
This file contains hidden or 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 MyController < ApplicationController | |
def index | |
@model = MyModel.new | |
@model.foo = "ABCD" | |
@model.bar = "1234" | |
session[:my_stuff] = @model.session_vars | |
end | |
def show | |
session[:my_stuff][:foo] # "ABCD" |
This file contains hidden or 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 | |
# Openssl script to regenerate the Apache2 cert in place of apache2-ssl-certificate | |
echo "Use your url for the Common Name (CN)" | |
openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem |