-
Code Freeze Retrospective due on Thursday * John is doing a screencast * Shyamala's outline is: in this Google Doc * Screenshots are needed
-
John needs to connect with js folks like _nod * there are still a lot of js related tickets.
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
# encoding: utf-8 | |
# Write a method leap_year?. It should accept a year value from the user, check | |
# whether it is a leap year and return true or false. | |
# Calculate and display the number of minutes in a leap year (2000 and 2004) | |
# and the minutes in a non-leap year (1900 and 2005). | |
MINUTES_IN_HOUR = 60 | |
MINUTES_IN_DAY = MINUTES_IN_HOUR * 24 | |
def leap_year? | |
puts "Give me a year, I'll tell you if it leaps:" |
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 convert(temp) | |
(temp.to_f - 32) * 5/9 | |
end | |
puts "Give it to me in Fahrenheit:" | |
temp = gets | |
puts "Here it is in Celsius: " + convert(temp).to_s |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'redcarpet' | |
require 'albino' | |
class SyntaxRenderer < Redcarpet::Render::HTML | |
def block_code(code, language) | |
if language && !language.empty? | |
Albino.colorize(code, language) |
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
<h2>Table of Contents</h2> | |
<a href="#whitespace">Whitespace</a> | |
<a href="#comments">Comments</a> | |
<a href="#format">Format</a> | |
<a href="#miscellaneous">Miscellaneous</a> | |
<a href="#example">Practical Example</a> | |
<h3><a name="terminology"></a>Terminology</h3> | |
For those unfamiliar with <a href="http://www.w3.org/TR/CSS2/syndata.html#statements">CSS terminology</a>, these are the concise terms used in these standards. |
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
/** | |
* WTF? | |
* - This will let you define a shortcut like | |
* `derp` so that when you type `derp` and | |
* hit TAB, you get: | |
* $form['field_name']['#weight'] = weight; | |
* | |
* - 'field_name' and 'weight' are variables, | |
* which means that Textmate will auto-focus | |
* your current position to the first one and |
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
<? | |
function themename_preprocess_html(&$variables) { | |
// Add a body class to Articles based on the value of the 'field_article_type' | |
// field. e.g.: 'article-type-news' or 'article-type-blog'. | |
if(!empty($variables['page']['content']) && !empty($variables['page']['content']['system_main']['content']['nodes'])) { | |
$node = $variables['page']['content']['system_main']['content']['nodes'][arg(1)]['body']['#object']; | |
if(user_is_logged_in()) { | |
$node = $variables['page']['content']['system_main']['content']['nodes'][arg(1)]['#node']; | |
} | |
if($node->type == 'article' && !empty($node->field_article_type)) { |
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
<header class="article-heading"> | |
<div class="meta"> | |
<span class="author">by <a href="" class="name" rel="author">Jeff Eaton</a></span><span class="date">on June 20, 2012</span> <a href="" class="short-url">Short URL</a> | |
</div><!-- /.meta --> | |
<hgroup> | |
<h1>Module Monday: Custom Permissions</h1> | |
<h2 class="subtitle">Fancy subtitle shows right here just like this when there is one.</h2> | |
</hgroup> | |
<ul class="social"> | |
<li><a href="" class="comments">3 Comments</a></li> |
#Resources#
###Installation Profiles###
###Features##
###Drush & Makefiles###
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
(function ($) { | |
Drupal.behaviors.yourTheme = { | |
attach: function(context, settings) { | |
$('form label').css('display', 'none'); | |
if(Modernizr.input.placeholder) { | |
// Text inputs | |
var formElements = $('form').find('input, textarea'); | |
$.each(formElements, function(index, value){ | |
if($(this).is('input')){ | |
var label = $(this).siblings('label').text(); |