Skip to content

Instantly share code, notes, and snippets.

@nsnt
nsnt / docker-private-push.sh
Created August 19, 2016 10:44 — forked from Infra-Red/docker-private-push.sh
Push private docker hub images to Cloud Foundry
#!/bin/bash
if [ -z $3 ]; then
echo "Usage: $0 <app> <image> <start command>"
exit 1
fi
# Dockerhub details
echo "Login with your Docker ID."
echo -n "Username: "
@nsnt
nsnt / hello_world.rb
Last active August 29, 2015 13:57
hello_world.rb
require "sinatra"
require "mysql2"
require "cf-autoconfig"
class HelloWorld < Sinatra::Base
get "/" do
"Hello, World!"
end
end
diff --git a/lib/cloud_controller/rest_controller/routes.rb b/lib/cloud_controller/rest_controller/routes.rb
index 532a302..0dcb6b3 100644
--- a/lib/cloud_controller/rest_controller/routes.rb
+++ b/lib/cloud_controller/rest_controller/routes.rb
@@ -18,6 +18,7 @@ module VCAP::CloudController::RestController
blk.yield(api, *args)
end
end
+ puts "Defined route: '#{verb}' '#{path}' -> '#{klass}': '#{method.to_s}' / {#{blk.to_s}}"
end
@nsnt
nsnt / gist:4992376
Last active December 13, 2015 23:29
indent sample
x = {
:a => "a",
:b => "b",
:c => {
:x => "x",
:y => "y",
:z => {
:p => "p",
:q => "q",
}