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
<%= select(:team, :id, team_selection_matrix, {}, :onchange => "display(this,'#{@team.id}');") %> |
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
if ( function_exists( 'add_theme_support' )) { | |
add_theme_support( 'post-thumbnails' ); | |
// Add our image sizes | |
add_image_size( 'slider-thumb', 500, 372, true ); | |
add_image_size( 'small-slider-thumb', 300, 174, true ); | |
add_image_size( 'post-thumb', 820, 320, true); | |
} |
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 | |
/** | |
* Plugin Name. | |
* | |
* @package GF HubSpot Add-On | |
* @author AJ Morris | |
* @license GPL-2.0+ | |
* @link http://example.com | |
* @copyright 2013 Your Name or Company Name | |
* |
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 | |
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' ); | |
function enqueue_my_styles() { | |
global $wp_styles; | |
// Load the main stylesheet | |
wp_enqueue_style( 'my-theme', get_stylesheet_directory_uri() . '/style.css' ); |
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 | |
/** | |
* Plugin Name. | |
* | |
* @package Support_KB_Press | |
* @author Your Name <email@example.com> | |
* @license GPL-2.0+ | |
* @link http://example.com | |
* @copyright 2014 Your Name or Company Name | |
*/ |
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
require "lockdown" | |
require File.join(File.dirname(__FILE__), "session") | |
Lockdown::System.configure do | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
# Configuration Options | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
# Options with defaults: | |
# |
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 discretionary_leave | |
self.tokens.discretionary.map {|time| time.hours}.sum | |
end | |
def accrued_annual_leave(year=current_fiscal_year) | |
RateInfo.new(self, year).accrued_leave + discretionary_leave | |
end | |
def net_annual_leave(year=current_fiscal_year) | |
accrued_annual_leave(year) - used_annual_leave(year) |
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
xml.instruct! :xml, :version =>"1.0" | |
xml.feed(:xmlns => "http://www.w3.org/2005/Atom") do |feed| | |
feed.title('My Super Cool Feed!') | |
feed.link "rel" => "self", "href" => url_for(:only_path => false, | |
:controller => 'articles', | |
:action => 'atom') | |
feed.link "rel" => "alternate", "href" => url_for(:only_path => false, | |
:controller => 'articles') | |
feed.updated @articles.first.updated_at.strftime "%Y-%m-%dT%H:%M:%SZ" if @articles.any? | |
feed.author { feed.name "Academic Technologies" } |
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
require 'rubygems' | |
require 'net/ldap' | |
module Merb::Authentication::Strategies | |
class AtLdap < Merb::Authentication::Strategy | |
def run!( login, password ) | |
initialize_ldap_connection unless @ldap | |
@ldap.bind_as( | |
:base => "cn=#{login},ou=cats,o=gwu", |
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
# Originally from http://www.benlog.org/2008/6/29/bare-bones-date-picker-for-merb | |
# Modified for new Merb 0.9.6 helpers | |
module Merb::Helpers::Form | |
def date_field(*args) | |
if bound?(*args) | |
current_form_context.bound_date_field(*args) | |
else | |
current_form_context.unbound_date_field(*args) | |
end | |
end |
OlderNewer