Skip to content

Instantly share code, notes, and snippets.

View bbttxu's full-sized avatar

adam krawiec bbttxu

View GitHub Profile
body {
/* These class names are used by Drupal to indicate what kind of layout we have
* Handles visibility of #left, #right individually plus both hidden or both visible */ }
body.sidebar-left #left {
width: 190px; }
body.sidebar-left #main {
width: 750px;
margin-right: 0; }
body.sidebar-right #main {
width: 710px; }
.container {
width: 950px;
margin: 0 auto;
overflow: hidden;
display: inline-block; }
.container {
display: block; }
.column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {
display: inline;
@import 'blueprint/grid'
/*
requires compass gem
usage: compass compile path/to/grid.sass -e production --output-style nested
//
defines Blueprint grid variables
$blueprint_grid_columns: 24
$blueprint_grid_width: 30px
$blueprint_grid_margin: 10px
@import 'blueprint/grid'
//
requires compass gem
usage: compass compile path/to/grid.sass -e production --output-style nested
//
defines Blueprint grid variables
$blueprint-grid-columns: 24
$blueprint-grid-width: 30px
$blueprint-grid-margin: 10px
#!/usr/bin/env ruby -wKU
require 'rubygems'
require 'RMagick'
# copy image from http://www.hprcc.unl.edu/products/maps/acis/YearTDeptUS.png to local directory
img = Magick::ImageList.new("YearTDeptUS.png")
# interested in only the map of the US, not title, or legend
# values apply to this image only
histogram = img.crop(35, 128, 633, 319).color_histogram()
#!/usr/bin/env ruby -wKU
# ruby script written after reading with http://wattsupwiththat.com/2010/08/02/noaa-graphs-62-of-continental-us-below-normal-in-2010/
# processing appears overly simplistic
require 'rubygems'
require 'RMagick'
# copy image from http://www.hprcc.unl.edu/products/maps/acis/YearTDeptUS.png to local directory
img = Magick::ImageList.new("YearTDeptUS.png")
# interested in only the map of the US, omitting title and legend
#!/usr/bin/env ruby -wKU
# ruby script written after reading http://wattsupwiththat.com/2010/08/02/noaa-graphs-62-of-continental-us-below-normal-in-2010/
# processing in post appears overly simplistic, does not take into account weights of variations
require 'rubygems'
require 'RMagick'
# copy image from http://www.hprcc.unl.edu/products/maps/acis/YearTDeptUS.png to local directory
img = Magick::ImageList.new("YearTDeptUS.png")
# interested in only the map of the US, omitting title and legend
function wdc_evergreen_variables() {
$module_variables_used = array(
'wdc_evergreen_expiry_weeks' => 52,
'wdc_evergreen_ignore_weeks' => 4,
'wdc_evergreen_public_message' => _weeks_to_seconds( 52 ),
'wdc_evergreen_show_public_message' => _weeks_to_seconds( 4 ),
'wdc_evergreen_cron_timer' => 0
);
return $module_variables_used;
}
(function($) {
// this could be a module applied to any, all inputs
// on event, toggles to replacement_text if expected_text is not present
var toggle_text = function( expected_text, replacement_text ) {
return function( event ) {
var text = $(this).val().replace(/^\s*|\s*$/g,'');
if ( text == expected_text ) {
$(this).val( replacement_text );
}
function wdc_spotlight_theme( $existing, $type, $theme, $path ) {
return array(
'wdc_spotlight' => array(
'template' => 'wdc_spotlight',
'arguments' => array( 'node' => array(), 'index' => -1 )
),
'wdc_spotlights' => array(
'template' => 'wdc_spotlights',
'arguments' => array( 'formatted_nodes' => array(), 'class_names' => array() )
)/*,