Skip to content

Instantly share code, notes, and snippets.

View LeeXGreen's full-sized avatar

Lee Green LeeXGreen

View GitHub Profile
@LeeXGreen
LeeXGreen / packer.log
Created May 7, 2018 14:18
Packer Issue Details
2018/05/07 09:14:34 [INFO] Packer version: 1.2.3
2018/05/07 09:14:34 Packer Target OS/Arch: darwin amd64
2018/05/07 09:14:34 Built with Go Version: go1.10.1
2018/05/07 09:14:34 Detected home directory from env var: /Users/leeg
2018/05/07 09:14:34 Using internal plugin for amazon-ebsvolume
2018/05/07 09:14:34 Using internal plugin for digitalocean
2018/05/07 09:14:34 Using internal plugin for lxc
2018/05/07 09:14:34 Using internal plugin for lxd
2018/05/07 09:14:34 Using internal plugin for oneandone
2018/05/07 09:14:34 Using internal plugin for parallels-iso
Keen.configure({
projectId: id,
readKey: key
});
// Timeframe parameters for queries
var timeframe = "last_14_days"
var interval = "daily"
Keen.onChartsReady(function(){
error 500 do
err = env['sinatra.error']
error_list = err.message
error_type = 'code_error'
if (err.is_a?(DataMapper::SaveFailureError))
error_list = err.resource.errors.select { |i| true } # all errors
error_type = 'save_error'
end
respond_with(:code => response.status,
:error_type => error_type,
@LeeXGreen
LeeXGreen / Code
Created June 25, 2011 15:41
Bug with DataMapper 1.1.0, Ruby 1.8.6 -- undefined method 'first'
# Note -- DataMapper no longer officially supports 1.8.6.
# That's why this problem happens.
# For best results, switch to Ruby >= 1.8.7.
# However, if you simply cannot upgrade, this might help.
class Banner
include DataMapper::Resource
property :id, Serial
property :message_id, Integer, :required => true