Skip to content

Instantly share code, notes, and snippets.

@winston
winston / soloistrc
Created July 9, 2012 07:09
Consolidated soloistrc (Basic)
cookbook_paths:
- workspace
recipes:
######
## Meta OS X Base
- pivotal_workstation::osx_updates
- pivotal_workstation::set_finder_show_hd_on_desktop
- pivotal_workstation::defaults_fast_key_repeat_rate
- pivotal_workstation::function_keys
@winston
winston / soloistrc
Created February 8, 2012 08:26
Consolidated soloistrc (CI Image)
cookbook_paths:
- workspace
recipes:
######
## Meta OS X Base
- pivotal_workstation::java
- pivotal_workstation::sshd_on
- pivotal_workstation::screen_sharing_app
# - pivotal_workstation::Skype
@winston
winston / soloistrc
Created February 7, 2012 08:06
Consolidated soloistrc (Dev Image)
cookbook_paths:
- workspace
recipes:
######
## Meta OS X Base
- pivotal_workstation::osx_updates
- pivotal_workstation::set_finder_show_hd_on_desktop
- pivotal_workstation::defaults_fast_key_repeat_rate
- pivotal_workstation::function_keys
@winston
winston / gist:1680626
Created January 26, 2012 02:41
Rename Machine
scutil --set ComputerName #{hostname}
scutil --set LocalHostName #{hostname}
scutil --set HostName #{hostname}
hostname #{hostname}
diskutil rename / #{hostname}
@winston
winston / Gemfile
Last active September 28, 2015 15:10
For enabling SQLite3 in Rails
gem "sqlite3"
@winston
winston / controller.rb
Created July 6, 2011 16:31
GoogleVisualr Gem - Tree Map Creation Example
# http://code.google.com/apis/chart/interactive/docs/gallery/treemap.html#Example
def tree_map
data_table = GoogleVisualr::DataTable.new
data_table.new_column('string', 'Region')
data_table.new_column('string', 'Parent')
data_table.new_column('number', 'Market trade volume (size)')
data_table.new_column('number', 'Market increase/decrease (color)')
data_table.add_rows( [
["Global" , nil , 0 , 0 ],
@winston
winston / controller.rb
Created July 5, 2011 16:22
GoogleVisualr Gem - Combo Chart Creation Example
# http://code.google.com/apis/chart/interactive/docs/gallery/combochart.html
def combo_chart
data_table = GoogleVisualr::DataTable.new
data_table.new_column('string', 'month' )
data_table.new_column('number', 'Bolivia' )
data_table.new_column('number', 'Ecuador' )
data_table.new_column('number', 'Madagascar' )
data_table.new_column('number', 'Papua Guinea')
data_table.new_column('number', 'Rwanda' )
@winston
winston / controller.rb
Created July 4, 2011 15:04
GoogleVisualr Gem - Candlestick Chart Creation Example
# http://code.google.com/apis/chart/interactive/docs/gallery/candlestickchart.html
def candlestick_chart
data_table = GoogleVisualr::DataTable.new
data_table.new_column('string', 'day')
data_table.new_column('number', 'min')
data_table.new_column('number', 'opening')
data_table.new_column('number', 'closing')
data_table.new_column('number', 'max')
data_table.add_rows( [
@winston
winston / controller.rb
Created July 4, 2011 15:23
GoogleVisualr Gem - Geo Map Creation Example
# http://code.google.com/apis/chart/interactive/docs/gallery/geomap.html#Example
def geo_map
# Regions Example
data_table_regions = GoogleVisualr::DataTable.new
data_table_regions.new_column('string' , 'Country' )
data_table_regions.new_column('number' , 'Popularity')
data_table_regions.add_rows(6)
data_table_regions.set_cell(0, 0, 'Germany' )
data_table_regions.set_cell(0, 1, 200)
@winston
winston / controller.rb
Created July 1, 2011 09:03
GoogleVisualr Gem - Constructor Example
##############################
# Table with Constructor Format
data_table = GoogleVisualr::DataTable.new({
:cols => [ { :id => 'A', :label => 'NEW A' , :type => 'string' },
{ :id => 'B', :label => 'B-label', :type => 'number' },
{ :id => 'C', :label => 'C-label', :type => 'date' }
],
:rows => [ { :c => [ {:v => 'a'}, {:v => 1.0, :f => 'One'} , {:v => Date.parse('2008-02-28 00:31:26'), :f => '2/28/08 12:31 AM'} ] },
{ :c => [ {:v => 'b'}, {:v => 2.0, :f => 'Two'} , {:v => Date.parse('2008-03-30 00:31:26'), :f => '3/30/08 12:31 AM'} ] },
{ :c => [ {:v => 'c'}, {:v => 3.0, :f => 'Three'}, {:v => Date.parse('2008-04-30 00:31:26'), :f => '4/30/08 12:31 AM'} ] }