Skip to content

Instantly share code, notes, and snippets.

View michaljemala's full-sized avatar
🤘
Enjoying Golang

Michal Jemala michaljemala

🤘
Enjoying Golang
  • Bratislava, Slovakia
View GitHub Profile
/**
* RequireJS mustache plugin
*
* usage:
* require(['ModuleA', 'mustache!myTemplate'], function (ModuleA, myTemplate) {
* var a = new ModuleA();
* var html = myTemplate({foo: 'bar'});
*
* $(a.el).html(html);
* });
[
{rabbit, [
{heartbeat, 10},
{auth_backends, [rabbit_auth_backend_ldap, rabbit_auth_backend_internal]}
]},
{rabbitmq_auth_backend_ldap, [
{servers, ["10.26.163.180"]},
{dn_lookup_attribute, "uid"},
{dn_lookup_base, "ou=Users,dc=example,dc=com"},
{log, true},
---
local_route: 127.0.0.1
port: 8181
pid_filename: /tmp/cloud_controller.pid
nats_uri: nats://127.0.0.1:4222
message_bus_uri: nats://127.0.0.1:4222
external_domain:
- api.cloud.jemala.info
# See src/lib/dea/config.rb for optional config values.
# Base directory for dea, application directories, dea temp files, etc. are all relative to this.
base_dir: /tmp/dea_ng
domain: cloud.jemala.info
logging:
file: /vagrant/logs/dea_ng.log
level: debug2
---
# Local_route is the IP address of a well known server on your network, it
# is used to choose the right ip address (think of hosts that have multiple nics
# and IP addresses assigned to them) of the host running the Health Manager. Default
# value of nil, should work in most cases.
local_route: 127.0.0.1
# NATS message bus URI, adjust as needed.
# Can be overriden with NATS_URI env variable.
mbus: nats://127.0.0.1:4222/
$ cf push
Name> sinatra
Instances> 1
1: 128M
2: 256M
3: 512M
4: 1G
Memory Limit> 256M
Connected, dumping recent logs for app pc in org mjemala-org / space development as mjemala@gopivotal.com...
2014-02-11T09:43:07.37+0000 [API] OUT Created app with guid 99811d4e-9576-42cd-ab27-6a00669f8e49
2014-02-11T09:45:21.03+0000 [API] OUT Updated app with guid 99811d4e-9576-42cd-ab27-6a00669f8e49 ({"state"=>"STARTED"})
2014-02-11T09:47:07.48+0000 [RTR] OUT pc.cfapps.io - [11/02/2014:09:47:06 +0000] "GET / HTTP/1.1" 200 2809 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36" 10.10.2.209:38942 response_time:1.361077687 app_id:99811d4e-9576-42cd-ab27-6a00669f8e49
2014-02-11T09:47:07.79+0000 [RTR] OUT pc.cfapps.io - [11/02/2014:09:47:07 +0000] "GET /webjars/bootstrap/2.3.0/css/bootstrap.min.css;jsessionid=E2014124278B1BCB5BA877D5170BD0AA HTTP/1.1" 200 105939 "http://pc.cfapps.io/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36" 10.10.2.209:38942 response_time:0.024398401 a
@michaljemala
michaljemala / cf-jb-offline
Last active August 29, 2015 14:00
Building the tip of cloudfoundry java buildpack for offline usage
$ cd ~/Temp/
$ mkdir foo
$ cd foo/
$ ruby --version
ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-darwin13.1.0]
$ bundle --version
@michaljemala
michaljemala / cf-cb-jb-o
Created May 5, 2014 13:54
Pushing created offline java buildpack
$ cf buildpacks
Getting buildpacks...
buildpack position enabled locked filename
java_buildpack 1 true false buildpack_java_v2.1.zip
ruby_buildpack 2 true false buildpack_ruby_v46-245-g2fc4ad8.zip
nodejs_buildpack 3 true false buildpack_nodejs_v8-177-g2b0a5cf.zip
$ cd ~/Temp/spring-music/
@michaljemala
michaljemala / tls-client.go
Last active April 10, 2024 01:57
SSL Client Authentication Golang sample
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)