Skip to content

Instantly share code, notes, and snippets.

View diatmpravin's full-sized avatar

Pravin Mishra diatmpravin

View GitHub Profile
@diatmpravin
diatmpravin / cf-170.yml
Created December 12, 2014 11:29
cf 170 yml
<%
director_uuid = '4e6c3124-f826-43d0-abc8-aaad278be7b4'
static_ip = 'xxxxxxxxxxxxxxxxxxxxxxx'
root_domain = "xxxxxxxxxxx"
deployment_name = 'cf'
cf_release = '170'
protocol = 'http'
common_password = 'c1oudc0wc1oudc0w'
%>
---
@diatmpravin
diatmpravin / cf-services-contrib-manifest.yml
Created November 18, 2014 10:30
cf-services-contrib manifest
director_uuid: <my director uuid>
releases:
- name: cf-services-contrib
version: 4
compilation:
workers: 10
network: default
reuse_compilation_vms: true
@diatmpravin
diatmpravin / cf-171.yml
Created November 18, 2014 10:28
cf-171 manifest file
<%
director_uuid = <my director uuid>
static_ip = <my floating ip>
root_domain = <my domain>
deployment_name = 'cf'
cf_release = '171'
protocol = 'http'
common_password = <redacted>
%>
---
@diatmpravin
diatmpravin / cf-postgresql.yml
Created October 13, 2014 03:56
CF PostgreSQL service deployment config file
---
name: cf-services-contrib
director_uuid: 0ddre47e-5gfb-4095-859e-5a08f9eacf02 # CHANGE
releases:
- name: cf-services-contrib
version: 1
compilation:
workers: 3
@diatmpravin
diatmpravin / go_couchdb
Created June 27, 2014 06:53
Sample CouchBD Golang connecting code
package main
import (
"log"
"fmt"
"github.com/couchbaselabs/go-couchbase"
)
var (
bucket *couchbase.Bucket
package revel
import (
"fmt"
"reflect"
"regexp"
"time"
)
type Validator interface {
@diatmpravin
diatmpravin / validation.go
Last active August 29, 2015 14:00
validation.go
package revel
import (
"fmt"
"net/http"
"net/url"
"regexp"
"runtime"
)
@diatmpravin
diatmpravin / chef_error
Created March 13, 2014 14:46
chef error
vagrant up
/opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- vagrant/util/downloader (LoadError)
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/ubuntu/.vagrant.d/gems/gems/vagrant-omnibus-1.3.1/lib/vagrant-omnibus/action/install_chef.rb:20:in `<top (required)>'
from /home/ubuntu/.vagrant.d/gems/gems/vagrant-omnibus-1.3.1/lib/vagrant-omnibus/plugin.rb:35:in `require_relative'
from /home/ubuntu/.vagrant.d/gems/gems/vagrant-omnibus-1.3.1/lib/vagrant-omnibus/plugin.rb:35:in `block in <class:Plugin>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:37:in `block (2 levels) in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:36:in `tap'
from /opt/vagrant/embedded/gems/gems/vagrant-1.1.5/lib/vagrant/action/runner.rb:36:in `block in run'
@diatmpravin
diatmpravin / task.go
Created March 12, 2014 18:34
Revel Sample Controller
package controllers
import (
"github.com/revel/revel"
"ToGo/app/models"
"ToGo/app/routes"
"github.com/jinzhu/gorm"
type Task struct {
ModelController
@diatmpravin
diatmpravin / go_mongodb_sample_app
Created March 11, 2014 12:04
Go+Martini+mgo(mongodb driver) Sample Application
package main
import (
"fmt"
"github.com/codegangsta/martini" // loading in the Martini package
"github.com/martini-contrib/render"
"labix.org/v2/mgo" // loading in the mgo MongoBD driver package
"labix.org/v2/mgo/bson" // loading in the bson package
"net/http"
)