Skip to content

Instantly share code, notes, and snippets.

@nota-ja
nota-ja / ccdb-tables.txt
Created March 16, 2014 17:08
Tables in CCDB
| app_events |
| app_usage_events |
| apps |
| apps_routes |
| billing_events |
| buildpacks |
| delayed_jobs |
| domains |
| domains_organizations |
| droplets |
@nota-ja
nota-ja / ccng-routes.v172.txt
Created August 12, 2014 09:56
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v172)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / ccng-routes.v173.txt
Created August 12, 2014 09:58
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v173)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/app_security_groups/:guid {:controller => "VCAP::CloudController::AppSecurityGroupsController", :action => "delete"}
####### DELETE /v2/app_security_groups/:guid/spaces/:other_id {:controller => "VCAP::CloudC
@nota-ja
nota-ja / ccng-routes.v175.txt
Created August 12, 2014 10:00
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v175)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / ccng-routes.v176.txt
Created August 12, 2014 10:02
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v176)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / ccng-routes.v177.txt
Created August 12, 2014 10:05
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v177)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / ccng-routes.v178.txt
Created August 14, 2014 11:48
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v178) (I feel very strange because this is identical to v172)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / ccng-routes.v179.txt
Last active August 29, 2015 14:05
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v179)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / ccng-routes.v180.txt
Last active August 29, 2015 14:05
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v180)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / 2014-09-10.gist.diff
Created September 10, 2014 23:58
Changes to make etherpad-lite-cf run with DB on Cloud Foundry
diff --git a/etherpad-lite-cf-org/node_modules/ep_etherpad-lite/node/utils/Settings.js b/etherpad-lite-cf/node_modules/ep_etherpad-lite/node/utils/Settings.js
index 9bfcae4..20794b5 100644
--- a/etherpad-lite-cf-org/node_modules/ep_etherpad-lite/node/utils/Settings.js
+++ b/etherpad-lite-cf/node_modules/ep_etherpad-lite/node/utils/Settings.js
@@ -222,7 +222,28 @@ exports.reloadSettings = function reloadSettings() {
console.warn("You need to set a sessionKey value in settings.json, this will allow your users to reconnect to your Etherpad Instance if your instance restarts");
}
+ if (process.env.DATABASE_URL) {
+ var parseDbUrl = require("parse-database-url");