Skip to content

Instantly share code, notes, and snippets.

View spiegela's full-sized avatar

Aaron Spiegel spiegela

  • Stealth Data Analytics Company
  • Kansas City, MO
  • X @spiegela
View GitHub Profile
@spiegela
spiegela / Vagrantfile
Last active September 3, 2018 23:16
Add secondary disk to fusion vagrant box that gets destroyed along with the VM
config.vm.provider :vmware_fusion do |v|
vdiskmanager = '/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager'
dir = "#{ENV['PWD']}/.vagrant/additional-disks"
file_to_disk = "#{dir}/hd2.vmdk"
if ARGV[0] == "up"
unless File.directory?( dir )
Dir.mkdir dir
end
unless File.exists?( file_to_disk )
`#{vdiskmanager} -c -s 100GB -a lsilogic -t 0 #{file_to_disk}`
// Select box utilizing Select2 functionality that overrides Ember.Select;
// Define view in the same way that you would an Ember.Select view.
// Additional attributes supported are: width, allowClear, and closeOnSelect;
// Example view:
// {{ view App.Select2
// viewName="fieldValueSelect2"
// prompt="Please select a value list"
// contentBinding="controller.fieldValuesLists"
// optionLabelPath="content.name"
// optionValuePath="content.id"
// Select box utilizing Select2 functionality that overrides Ember.Select;
// Define view in the same way that you would an Ember.Select view.
// Additional attributes supported are: width, allowClear, and closeOnSelect;
// Example view:
// {{ view App.Select2
// viewName="fieldValueSelect2"
// prompt="Please select a value list"
// contentBinding="controller.fieldValuesLists"
// optionLabelPath="content.name"
// optionValuePath="content.id"
@spiegela
spiegela / gzip.rb
Created March 8, 2013 04:00 — forked from romanbsd/gzip.rb
require 'faraday'
require 'zlib'
module FaradayMiddleware
class Gzip < Faraday::Response::Middleware
def on_complete(env)
return unless env[:body].is_a? String
encoding = env[:response_headers]['content-encoding'].to_s.downcase
case encoding