Skip to content

Instantly share code, notes, and snippets.

@coderanger
coderanger / editor.rb
Last active October 14, 2015 20:20 — forked from Sauraus/editor.rb
Unity cookbook
require 'chef/resource'
require 'chef/provider'
module Unity
module Resources
module UnityEditor
# A 'unity_editor' resource to install and uninstall Unity Editor.
class Resource < Chef::Resource::LWRPBase
self.resource_name = :unity_editor
@coderanger
coderanger / gist:6429373
Last active December 22, 2015 06:09 — forked from ewdurbin/gist:6429299
url = require('url')
querystring = require('querystring')
component_name = (organization_id, component_id, cb) ->
http.get"http://#{organization_id}.statuspage.io/index.json", (res) ->
payload = JSON.parse(res.body.payload)
for comp in payload.components
if comp.id == component_id
return cb(comp.name)
#
# This is the template file
#
<Port <%= @port %> >
# bla bla bla
</Port>
#
# The problem is I get several files; port_80.conf port_8080.conf, ... port_8888.conf
r = gem_package "amazon-ec2" do
version "0.9.17"
end
r.run_action(:install)
require 'rubygems'
Gem.clear_paths
require 'AWS'
ruby_block "register_with_elb" do