Skip to content

Instantly share code, notes, and snippets.

View phatjam98's full-sized avatar

Travis Carter phatjam98

  • Las Vegas
View GitHub Profile
@phatjam98
phatjam98 / full_auto_update.md
Last active July 6, 2017 03:30
Updates for full auto planned events

Resource Objects

Event Service

Event

{
  ...
  "audit_state_enum": 0 // { 0: not_reviewed, 1: no_changes, 2: changes, 3: full_auto, 4: full_not_reviewed }
  ...

}
@phatjam98
phatjam98 / migrate.rb
Last active August 29, 2015 14:24
Category Icon Migration
## Update icon_urls hash
def migrate_category_icons(dry_run = true)
Category.all.no_timeout.batch_size(200).each do |cat|
#V4 icons
cat.icon_urls = {} if cat.icon_urls == nil
if cat.active_icon_url.present? && cat.icon_urls['default'] == nil
cat.icon_urls['default'] = cat.active_icon_url
cat.save unless dry_run
puts "Updating #{cat.id} from active_icon_url: icon_urls['default'] = #{cat.icon_urls['default']}"
```
image = Magick::Image.read(icon_url)
image = image.quantize(256, Magick::GRAYColorspace)
colored = Magick::Image.new(60, 60) { self.background_color = "red" }
colored.composite!(image.negate, 0, 0, Magick::CopyOpacityCompositeOp)
colored.write(output_filename)
```

Enterprise-Service

Endpoints

Is the intent to modify this route to accept subdomain name for :customer_id and email for :id

/admin/customers/:customer_id/saas_users/:id

Banjo-Admin

Endpoints:

PUT /v1/events/:event_id/event_updates/:id

parameters:

  • event_id: String
  • id: String
  • injection_coordinates: Array

Output unprocessable_entity: status 422