Skip to content

Instantly share code, notes, and snippets.

{{define "layout"}}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{template "title"}}</title>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
</script>
</head>
{{define "layout"}}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{template "title"}}</title>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
</script>
</head>
@VimleshS
VimleshS / main.go
Created January 18, 2016 12:35 — forked from mattetti/main.go
Go's reflection example
package main
import(
"fmt"
"reflect"
)
func main(){
// iterate through the attributes of a Data Model instance
for name, mtype := range attributes(&Dish{}) {
@VimleshS
VimleshS / db.go
Created January 20, 2016 10:35 — forked from SchumacherFM/db.go
GoLang Database SQL: Selecting an unknown amount of columns from a query. Benchmark results in db_test.go
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"log"
)
const (
@VimleshS
VimleshS / digital_ocean_setup.md
Created January 21, 2016 12:25 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@VimleshS
VimleshS / git-rebase.markdown
Created January 28, 2016 09:00 — forked from tmcgilchrist/git-rebase.markdown
Git rebase workflow

Checkout a new working branch

 git checkout -b <branchname>

Make Changes

 git add
 git commit -m "description of changes"

Sync with remote

package main
import (
"github.com/gin-gonic/gin"
"io/ioutil"
"log"
"net/http"
)
type LoginJSON struct {
@VimleshS
VimleshS / jenkins-rails-ec2
Created April 11, 2016 07:27
Jenkins setup for Rails on EC2
Based on these:
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
http://www.intridea.com/blog/2013/5/21/howto-install-setup-jenkins-ci-for-rails-projects
Setup an EC2 instance with Ubuntu (14.04)
Open port 8080
Install Jenkins
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
@VimleshS
VimleshS / gist:e5320d81f55b758f0babc16f912332d0
Created May 6, 2016 07:17 — forked from telephone/gist:3869611
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Ubuntu)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command palette
Ctrl+` python console
Ctrl+N new file

Editing