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
!!! | |
%html | |
%head | |
%title tubes | |
%body | |
%h1 | |
hi | |
=yield |
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 'sinatra' | |
require 'youtube_g' | |
client = YouTubeG::Client.new | |
faves = client.videos_by(:favorites, :user => 'alexanderkahn') | |
output = '' | |
faves.videos.each do |fave| | |
output = output + fave.embed_html |
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
// Look for the sidebar-right section, rip some stuff out, add in some stuff. | |
// This still has ugly echoditto poo in it, we may want to make it cleaner. | |
<?php if ($node->type == "campaign") { ?> | |
<div id="sidebar"> | |
<?php } else if (_freepress_helper_get_tertiary_nav()){?> | |
<!--<div id="sidebar" style="margin-top:-45px">--> | |
<div id="sidebar"> | |
<?php } else { ?> | |
<div id="summit-sidebar"> |
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
foreach ($vars['node']->field_link as $link) { | |
$vars['model_links'] .= l($link['title'], $link['url'], $link['attributes']); | |
} |
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
color ir_black " my favorite stock colorscheme is desert | |
set autochdir | |
syntax on | |
set hlsearch | |
set wildmenu | |
set wildmode=longest:full | |
set incsearch | |
filetype plugin on | |
set ruler | |
set laststatus=2 |
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
$types = node_get_types(); | |
$options = array(); | |
foreach ($types as $type) { | |
$options[$type->type] = $type->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
photo_urls = [] | |
page_urls.each_with_index do |page_url, i| | |
photo_url = Scrubyt::Extractor.define :agent => :firefox do | |
fetch page_url[:page_url] | |
deviation "//div[@id='deviation']", :example_type => :xpath do | |
image "//span[@id='zoomed-in']/a/img", :example_type => :xpath do | |
image_url 'src', :type => :attribute | |
end | |
date_submitted "//div[@class='details']/span", :example_type => :xpath |
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
$show = FALSE; | |
$node = node_load(arg(1)); | |
if (array_key_exists(38, $node->taxonomy) { | |
$show = TRUE; | |
} | |
if (array_key_exists(38, $node->taxonomy) { | |
$show = TRUE; | |
} | |
return $show; |
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
$paths = array('newsroom/for_the_press', 'newsroom/spokespeople'); | |
$current_path = drupal_get_path_alias($_GET['q']); | |
if (in_array($current_path, $paths) { | |
$show = 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
$(document).ready(function() { | |
$('ul#nc-counties').append('<select/>'); | |
$('ul#nc-counties a').each(function(i, link) { | |
$('#nc-counties select').append('<option/>').val(link.href).text(link.href); | |
}); | |
}); |