Skip to content

Instantly share code, notes, and snippets.

View cybersiddhu's full-sized avatar

Siddhartha Basu cybersiddhu

View GitHub Profile
package main
import (
"net/http"
)
type MiddlewareFn func(http.HandlerFunc) http.HandlerFunc
type Chain struct {
middlewares []MiddlewareFn
package main
import (
"context"
"net/http"
"github.com/julienschmidt/httprouter"
)
const params = "params"
@cybersiddhu
cybersiddhu / main.go
Created April 24, 2017 20:07
golang webapp example
package main
import (
"context"
"fmt"
"log"
"math/rand"
"net/http"
"os"
"time"
@cybersiddhu
cybersiddhu / NOTES.md
Last active April 26, 2017 14:29
notes

Aim

The idea was to have a intermine prototype for dictybase, dictymine running with a basic Genes -> GO -> GO annotation with all the basic features up and running. And then try out a deploy to google cloud using my stack of docker and kuberntes

Progress

  • On the first day saw the new intermine UI redgenes which i set it up with a simple
/*
* Return a promise object
* On success, it passes (response, true/false) to the resolve
* passes true if the user exists
* false if the user does not exist
* On error passes the error object, the structure should
* be similar as defined in the JSON AP specification
*
*/
const userExists = (email) => {
#RVM settings
if [[ -s ~/.rvm/scripts/rvm ]] ; then
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
else
if which rbenv &> /dev/null; then
RPS1="%{$fg[yellow]%}rbenv:%{$reset_color%}%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$reset_color%} $EPS1"
fi
fi
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
@cybersiddhu
cybersiddhu / falcorApp.jsx
Last active August 29, 2015 14:28 — forked from btholt/falcorApp.jsx
Falcor + React
const React = require('react');
const _ = require('lodash');
var model = new falcor.Model({
cache: {
movies: [
{
title: "Daredevil",
plot: "Marvel lol",
year: "2015-",
var backendData = [
{
"title":"Section 1",
"content":"Our content for the section 1"
},
{
"title":"Section 2",
"content":"Our content for the section 2"
},
{