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
$ cat dea_next/dea_next.log | grep "\"log_level\":\"error\""
{"timestamp":1424586340.7287219,"message":"stat-collector.info-retrieval.failed","log_level":"error","source":"Dea::StatCollector","data":{"handle":"18f946ch24j","error":"command exited with failure","backtrace":["/var/vcap/packages/dea_next/vendor/cache/warden-dd32a459c99d/em-warden-client/lib/em/warden/client/connection.rb:27:in `get'","/var/vcap/packages/dea_next/vendor/cache/warden-dd32a459c99d/em-warden-client/lib/em/warden/client.rb:43:in `call'","/var/vcap/packages/dea_next/lib/container/container.rb:192:in `call'","/var/vcap/packages/dea_next/lib/container/container.rb:170:in `info'","/var/vcap/packages/dea_next/lib/dea/stat_collector.rb:26:in `retrieve_stats'","/var/vcap/packages/dea_next/lib/dea/stat_collector.rb:69:in `block in promise_retrieve_stats'","/var/vcap/packages/dea_next/lib/dea/promise.rb:92:in `call'","/var/vcap/packages/dea_next/lib/dea/promise.rb:92:in `block in run'"]},"thread_id":13174900,"fiber_id":30092060,"process_id":1
@michaljemala
michaljemala / timeout.go
Last active August 29, 2015 14:17
A sample Go app demonstrating the 150.214.47.153:35443 is not accessible on PWS
package main
import (
"fmt"
"log"
"net"
"net/http"
"os"
)
@michaljemala
michaljemala / cf-ssh
Created January 30, 2015 17:29
SSH Client
package main
import (
"fmt"
"log"
// "github.com/cloudfoundry/cli/plugin"
"golang.org/x/crypto/ssh"
"golang.org/x/net/websocket"
)
@michaljemala
michaljemala / PCF Security Groups Test
Last active August 29, 2015 14:09
A transcript of test scenario for PCF security groups
[1]----------------------------------------------------------------------------
$ cf security-groups
Getting security groups as admin
OK
Name Organization Space
#0 all_open
[2]----------------------------------------------------------------------------
$ cf running-security-groups
{"type": "step_started", "id": "microbosh.setting_manifest"}
Running bosh micro deployment micro/
Deployment set to '/var/tempest/workspaces/default/deployments/micro/micro_bosh.yml'
{"type": "step_finished", "id": "microbosh.setting_manifest"}
{"type": "step_started", "id": "microbosh.deploying"}
Running bosh micro deploy /var/tempest/stemcells/bosh-stemcell-2690.3-vsphere-esxi-ubuntu-trusty-go_agent.tgz --update-if-exists
Verifying stemcell...
File exists and readable OK
Verifying tarball...
$ cf push wls-sample-web -b https://github.com/michaljemala/weblogic-buildpack -p resources/wls/WlsSampleWeb.war
Creating app wls-sample-web in org mjemala-org / space development as mjemala@gopivotal.com...
OK
Using route wls-sample-web.cfapps.io
Binding wls-sample-web.cfapps.io to wls-sample-web...
OK
Uploading wls-sample-web...
Uploading app files from: resources/wls/WlsSampleWeb.war
@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"
)
@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 / 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
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