Skip to content

Instantly share code, notes, and snippets.

View debajyoti-thetaonelab's full-sized avatar

Debajyoti Bhaumik debajyoti-thetaonelab

View GitHub Profile
#
# eGov SmartCity eGovernance suite aims to improve the internal efficiency,transparency,
# accountability and the service delivery of the government organizations.
#
# Copyright (C) 2017 eGovernments Foundation
#
# The updated version of eGov suite of products as by eGovernments Foundation
# is available at http://www.egovernments.org
#
# This program is free software: you can redistribute it and/or modify
@debajyoti-thetaonelab
debajyoti-thetaonelab / .tmux.conf
Created March 18, 2019 09:14
some description
# general
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g repeat-time 200
setw -g mode-keys emacs
# set -g mouse on
set -g default-terminal "screen-256color-bce"
set -g escape-time 10
@debajyoti-thetaonelab
debajyoti-thetaonelab / .vimrc
Created March 17, 2019 06:11
some description
" Debjyoti's Config begins
set nocompatible " be iMproved, required
syntax on
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
#!/bin/bash
NODE_IPS="10.22.150.89 10.22.150.151 10.22.150.252 10.22.150.111 10.22.150.154"
# Need the blockchain-key.pem in $HOME/.ssh dir as vara.pem
# or modify it location in the next line
IDENTITY_FILE=~/.ssh/vara.pem
counter=1
@debajyoti-thetaonelab
debajyoti-thetaonelab / fetchAPI.js
Last active January 14, 2019 15:06 — forked from sibu-github/fetchAPI.js
A common function which can handle all fetch calls with proper error handling
/**
* Common fetchAPI which can handle GET and POST method
* Content-Type is set to 'application/json'
* payload should be in JSON format
*/
export async function fetchAPI(url, data, method = 'POST') {
// raise an error if url is missig
if (!url) {
throw new Error('url is missing');
}
#/bin/bash
docker container stop $(docker container ls --all | awk 'NR>1 && !($NF ~ /minio/) {print $NF}')
docker container ls --all | awk 'NR>1 && !($NF ~ /minio/) {print $NF}' | xargs docker container rm
docker volume prune --force
# remove the chaincode images
docker image rm $(docker images | awk 'NR>1 && $1 ~ /dev-peer/ {print $1}')
#!/bin/bash
# Create a tmux session each session
tmux new -d -s kyc
# Don't create tunnel if ip is 10.22.150.89
# Find the ip address
h=$(hostname)
h=${h:3:${#h}}
myip=${h//-/.}
[user]
name = <Your Name>
email = <Your Email>
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lnc = log --pretty=format:"%h\\ %s\\ [%cn]"
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
// This spits out sample data for UI and other testing parpose
// const chalk = require('chalk')
const Promise = require('bluebird')
const router = require('express').Router()
const { getConnection } = require('../database/connection')
const _ = require('lodash')
const getMetaData = () => {
return Promise.using(getConnection(), conn => {
@debajyoti-thetaonelab
debajyoti-thetaonelab / .tmux.conf
Created July 22, 2017 15:43
My tmux config file
# general
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g repeat-time 200
setw -g mode-keys emacs
set -g mouse on
set -g default-terminal "screen-256color-bce"