Skip to content

Instantly share code, notes, and snippets.

View johnrobertwilson's full-sized avatar

John Robert Wilson johnrobertwilson

View GitHub Profile
@johnrobertwilson
johnrobertwilson / adapter.js
Created June 22, 2011 15:08
Adapter Load Libraries via ARRAY
DATAVIZ.adapters.jqplot = function() {
$.ajaxSetup({async: false});
$.getScript('DATAVIZ.jqplot.js');
$.ajaxSetup({async: true});
}
DATAVIZ.adapters.jit = function() {
$.ajaxSetup({async: false});
$.getScript('DATAVIZ.jit.js');
$.ajaxSetup({async: true});
@johnrobertwilson
johnrobertwilson / gist:1041926
Created June 23, 2011 04:55
dataviz jquery
var DATAVIZ = { };
DATAVIZ.adapters = new Array();
DATAVIZ.adapters['jqplot'] = { };
DATAVIZ.adapters['jqplot'] = {
init : function() {
//Maybe load the file here instead?
},
render : function(data_object, type, container_id) {
@johnrobertwilson
johnrobertwilson / gist:1041933
Created June 23, 2011 04:58
dataviz.jqplot
(function($){
DATAVIZ = {};
DATAVIZ.jqplot = {};
DATAVIZ.jqplot.render = function(data_object, type, container_id) {
...stuff specifc to the jqplot library
}
})(jQuery);
$theme = 'energy';
$info = color_get_info($theme);
$info['schemes'][''] = array('title' => t('Custom'), 'colors' => array());
$color_sets = array();
$schemes = array();
foreach ($info['schemes'] as $key => $scheme) {
$color_sets[$key] = $scheme['title'];
$schemes[$key] = $scheme['colors'];
$schemes[$key] += $info['schemes']['default']['colors'];
drupal_add_css('misc/farbtastic/farbtastic.css', 'file');
drupal_add_js('misc/farbtastic/farbtastic.js', 'file');
$form['chart_options']['plot']['plot_background_color'] = array(
'#type' => 'textfield',
'#title' => t('Page Title Color'),
'#default_value' => '#FFF',
'#description' => '<div id="plot_background_colorpicker"></div>',
'#size' => 9,
'#maxlength' => 7,
'#suffix' => "<script type='text/javascript'>
# On branch data_visualization
# Changes to be committed:
#
# modified: .gitignore
# modified: .gitmodules
# modified: GIT.md
# new file: config/drush/aliases.drushrc.php
# new file: config/solr/conf/admin-extra.html
# new file: config/solr/conf/app-default.xml
# new file: config/solr/conf/elevate.xml
@johnrobertwilson
johnrobertwilson / gist:1120496
Created August 2, 2011 15:51
Getting wierd Incorrect Table definition when trying to install this skeleton module.. does anything look wrong?
<?php
// $Id$
/**
* Implementation of hook_schema()
*
* TODO: Describe the module's data model
*
*/
function tcb_entities_schema() {
@johnrobertwilson
johnrobertwilson / gist:1197958
Created September 6, 2011 15:56
Air Apache Vhost settings
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
@johnrobertwilson
johnrobertwilson / .htaccess
Created September 6, 2011 17:16
Drupal 7 .htaccess
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
@johnrobertwilson
johnrobertwilson / gist:1201011
Created September 7, 2011 16:20
DOE Setup?
<VirtualHost *:80>
ServerAdmin "jwilson@treehouseagency.com"
DocumentRoot "/Developer/D7/docroot"
ServerAlias drupal7.local
ErrorLog "/var/log/apache2/drupal7.local_log"
</VirtualHost>
<VirtualHost *:80>
ServerAdmin "jwilson@treehouseagency.com"
DocumentRoot "/Developer/DOE/energy.gov/docroot"