Skip to content

Instantly share code, notes, and snippets.

View aboutaaron's full-sized avatar

Aaron Williams aboutaaron

View GitHub Profile
@aboutaaron
aboutaaron / cayuga_aaronwilliams.markdown
Created December 17, 2011 19:20
Aaron Williams - Articles

Cayuga Park in San Francisco sees future renovation

Ingleside Light, Summer 2010

Cayuga Park has seen better days.

The famous park has a fence and chains around its play areas and the clubhouse closed two years ago due to plumbing issues. However, plans to rebuild Cayuga Park are in the final stag- es as community members and city departments figure out to maintain and enhance the garden-like vibe of the park.

The joint venture between the city’s Parks and Recreation Department, The Cayuga Improvement Association and the San Francisco Arts Commission needs final approval from the Art Commission, which is scheduled to happen in September. Prospective park builders will then be sought for afterward. Funding for the park came from the 2008 voter-approved $185 million Neighborhood Parks bond that gave money to parks in dire need of repair. Funding also came from BART to replace the playground area that will be removed while they rebuild the track support columns.

@aboutaaron
aboutaaron / Highcharts Tooltip
Created October 4, 2012 20:22
Shitty load in IE6-9?
tooltip: {
useHTML: true,
formatter: function() {
// This is using the Highcharts tooltip API plus the JS ternary operator to conditionally add tooltips to the accumulated gross
// http://stackoverflow.com/a/7344366/868724
return this.x + "<br>" + this.series.name + ': <strong>$' + Highcharts.numberFormat(this.y) + '</strong>' + ( typeof this.point.weeks !== "undefined" ? "<br>Weeks in box office: " + this.point.weeks : "" )
},
@aboutaaron
aboutaaron / index.html.erb
Created October 4, 2012 20:55
Ruby highcharts erb
<script type="text/javascript">
$(function () {
// Creating styles here to keep boilerplate down
var chartStyles = {
fontSize: '14px',
fontWeight: 'normal',
color: '#231F20',
fontFamily: "Georgia, 'Times New Roman', Times, serif",
textTransform: 'uppercase'
@aboutaaron
aboutaaron / index.html
Created October 17, 2012 23:36
YouTube player from Edmonton Journal
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
function onYouTubePlayerReady(playerId) {
ytplayer = document.getElementById("myytplayer");
setInterval(updateytplayerInfo, 250);
updateytplayerInfo();
ytplayer.addEventListener("onStateChange", "onytplayerStateChange");
ytplayer.addEventListener("onError", "onPlayerError");
}
@aboutaaron
aboutaaron / mail.rake
Created October 17, 2012 23:47
Ruby Mail auth
options = { :address => "smtp.gmail.com",
:port => 587,
:domain => 'gmail.com',
:user_name => user_name,
:password => password,
:authentication => 'plain',
:enable_starttls_auto => true }
Mail.defaults do
delivery_method :smtp, options
@aboutaaron
aboutaaron / gist:3942170
Created October 23, 2012 22:34
Cooking...
https://gist.github.com/1951671
http://ejohn.org/projects/javascript-diff-algorithm/
https://github.com/aurelian/ruby-stemmer
http://www.propublica.org/nerds/item/when-are-190-emails-like-six-emails
@aboutaaron
aboutaaron / routes.rb
Created January 22, 2013 18:16
Proper routes, my boy!
ChSound::Application.routes.draw do
#get "list/index"
resources :list
#get "gallery/index"
resources :gallery
# Set List/index as root
# app can now be accessed at 0.0.0.0:3000
# instead of 0.0.0.0:3000/list/index
@aboutaaron
aboutaaron / homebrew.sh
Created February 25, 2013 22:24
How to fix homebrew every time it doesn't want to overwrite changes
# https://github.com/mxcl/homebrew/issues/13373
cd `brew --prefix`
rm Library/Formula/stunnel.rb
brew update -v
# https://gist.github.com/1214011
module WillPaginate
module ActionView
def will_paginate(collection = nil, options = {})
options[:renderer] ||= BootstrapLinkRenderer
super.try :html_safe
end
class BootstrapLinkRenderer < LinkRenderer
@aboutaaron
aboutaaron / server.rb
Created June 5, 2013 19:15
Quick Ruby server for static assets
require 'webrick'
include WEBrick
s = HTTPServer.new(
:Port => 3000,
:DocumentRoot => Dir::pwd
)
trap("INT"){ s.shutdown }