Skip to content

Instantly share code, notes, and snippets.

View akahn's full-sized avatar

Alex Kahn akahn

View GitHub Profile
print "partay!!"
function my_garland_preprocess_views_view__principles(&$vars) {
$vars['test'] = 'Hi!!!';
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>untitled</title>
<style type="text/css">
require 'rubygems'
require 'scrubyt'
photos = Scrubyt::Extractor.define :agent => :firefox do
fetch 'http://alexanderkahn.deviantart.com/gallery'
link_title "//a[@class='t']", :write_text => true do
link 'href', :type => :attribute
end
function sti_migrate_import($options, &$context) {
// For node_object_prepare()
module_load_include('inc', 'node', 'node.pages');
module_load_include('inc', 'filefield', 'field_file');
$query = 'SELECT * FROM {sti_stories} ORDER BY imagefile DESC';
$context['sandbox']['progress'] = 0;
$context['sandbox']['results'] = array();
$context['sandbox']['max'] = $options['count'];
$(document).ready(function(){
$('#edit-taxonomy-3-wrapper select').change(function() {
if ($('option:selected',this).html() == 'Other...') {
$('#edit-field-i-am-other-0-value-wrapper').slideDown('fast');
}
else {
$('#edit-field-i-am-other-0-value-wrapper').slideUp('fast');
}
});
});
/**
* Zips must be 5-digit integers and email addresses must be valid.
*/
function email_zip_validate($form, &$form_state) {
if (!is_numeric((int)$form_state['values']['zip']) || strlen($form_state['values']['zip']) != 5) {
form_set_error('zip', t('The zip code you entered was not valid. Please try entering it again.'));
}
if (!valid_email_address($form_state['values']['email'])) {
form_set_error('email', t('The email address you entered was not valid. Please try entering it again.'));
}
for (i = 0; i++; i < 10) {
$('.view-featurebox').after('hi');
}
!!!
%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