Skip to content

Instantly share code, notes, and snippets.

View tbrooke's full-sized avatar

Tom Brooke tbrooke

  • Brooke and Sons LLC
  • China Gove, NC 28023
View GitHub Profile
<!-- Used to display header for items from a related database that is conditional on items being present.
for_each will not display anything but this construct is required to eliminate the title reverse link
-->
<w:if condition="Events.self.count > 0">
<h3>Events</h3>
<w:for_each in="Events">
<h5><a href='<w:get name="in.path" url="/item_page"/>'><w:get name="in.name" /></a></h5>
</w:for_each>
</w:if>
<-- Use this to write an XML feed - this particular one was used to create a feed from a databsse that included locations in Latitude and Longitude and is read DIYMaps (http://www.backspace.com/mapapp/) to plot the sites on a map -->
<w:kb:item:each type="site" sort="name">
<state id="point">
<name><w:escape_html><w:city/></w:escape_html></name>
<loc><w:escape_html><w:latitude/>,<w:longitude/></w:escape_html></loc>
<url><w:path url="/Site_des" /></url>
<hover><w:escape_html><w:name/></w:escape_html></hover>
</state>
@tbrooke
tbrooke / google_map.js
Created September 20, 2012 12:54
Google Maps JS for Refinery
window.onload = loadMap;
function loadMap() {
var latLong = new google.maps.LatLng(35.557721,-80.594043);
var mapOptions = {
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: latLong
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);
@tbrooke
tbrooke / map_view.html.haml
Created September 20, 2012 12:56
Haml Theme
= raw @page.content_for(:intro)
= javascript_include_tag "google_map"
#map_canvas
= raw @page.content_for(:body)
= render :partial => "/refinery/content_page"
@tbrooke
tbrooke / gist:4594736
Created January 22, 2013 13:41
Fireworks Logo HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>home.png</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">td img {display: block;}</style>
<!--Fireworks CS6 Dreamweaver CS6 target. Created Tue Jan 15 14:48:24 GMT-0500 (Eastern Standard Time) 2013-->
<script language="JavaScript1.2" type="text/javascript">
@tbrooke
tbrooke / gist:7706288
Created November 29, 2013 14:15
I started with the error mess the print outs from list, version env plugins from my /.lein/profiles.clj and finally the core.clj and init.clj from my project
imm lein immutant run
Starting Immutant: /Users/tmb/.immutant/current/jboss/bin/standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /Users/tmb/.immutant/current/jboss
JAVA: /System/Library/Frameworks/JavaVM.framework/Home//bin/java
require 'clio_client'
require 'date'
def token_file; "ClioToken.txt"; end
saved_token = nil
client_id = "YOUR-APP-KEY-HERE"
client_secret = "YOUR-APP-SECRET-HERE"
client = ClioClient::Session.new({client_id: client_id, client_secret: client_secret})
@tbrooke
tbrooke / Gemfile
Last active August 29, 2015 14:04
Simple Command Line Parser in Ruby
## Gemfile Mainly for Specs
gem 'rspec', github: 'rspec/rspec'
gem 'rspec-core', github: 'rspec/rspec-core'
gem 'rspec-mocks', github: 'rspec/rspec-mocks'
gem 'rspec-expectations', github: 'rspec/rspec-expectations'
gem 'rspec-support', github: 'rspec/rspec-support'
@tbrooke
tbrooke / parse_spec.rb
Created July 15, 2014 15:57
Spec File for Parse
require 'parse.rb'
require 'rspec'
describe 'Reads and ouputs text from a file' do
end