Skip to content

Instantly share code, notes, and snippets.

View akahn's full-sized avatar

Alex Kahn akahn

View GitHub Profile
!!!
%html
%head
%title tubes
%body
%h1
hi
=yield
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
// 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">
foreach ($vars['node']->field_link as $link) {
$vars['model_links'] .= l($link['title'], $link['url'], $link['attributes']);
}
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
$types = node_get_types();
$options = array();
foreach ($types as $type) {
$options[$type->type] = $type->name;
}
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
$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;
$paths = array('newsroom/for_the_press', 'newsroom/spokespeople');
$current_path = drupal_get_path_alias($_GET['q']);
if (in_array($current_path, $paths) {
$show = TRUE;
}
$(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);
});
});