Skip to content

Instantly share code, notes, and snippets.

View cybersiddhu's full-sized avatar

Siddhartha Basu cybersiddhu

View GitHub Profile
{
"name": "minio-promise",
"version": "1.0.0",
"description": "using minio with promise",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"husky": {
"hooks": {
const Minio = require("minio")
const yargs = require("yargs")
const bunyan = require("bunyan")
const { Writable } = require("stream")
const filepath = require("path")
const tmp = require("tmp")
const argv = yargs // eslint-disable-line
.usage("Usage: $0 [options] - list all objects in the given path")
.option("host", {
@cybersiddhu
cybersiddhu / frontend-development.md
Last active November 25, 2021 18:53
Frontend development at dictyBase

Frontend development at dictyBase

React javascript framework is currently being used for all development. Below is a list of default tools, setups and configurations that are recommended for development.

React web applications

  • Create-react-app - Default tool for scaffolding a web application. The rest of the setup are mostly derived from this tool.

  • **[Linting with ESLint

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-",