Skip to content

Instantly share code, notes, and snippets.


Gopikrishna Sathyamurthy Gopikrishna19

View GitHub Profile
View try.js
const something = () => new Promise((resolve, reject) => {
setTimeout(() => reject(new Error('Rejected for some reason')), 1000);
const somethingElse = () => Promise.reject({});
// await something(); // top level await
const onRejected = () => console.log('Caught');
const tryThis = async (asyncFunc) => {
try {
def evaluate(
nakshatram: int,
udayadi_naligai: int,
mundaya_naligai: int,
nakshatra_iruppu: int,
should_reeval: bool,
padam: int = 1,
if nakshatram == 0:
return "NaksError"
View .gitconfig
a = !git add . && git status
ac = !git a && git commit
c = commit
ca = commit --amend
cm = commit -m
co = checkout
cob = checkout -b
cp = cherry-pick
d = diff
Gopikrishna19 / store-factory.js
Created Mar 16, 2020
seting up redux devtools
View store-factory.js
import {applyMiddleware, createStore} from 'redux';
import {State} from './state';
import {composeWithDevTools} from 'redux-devtools-extension';
import {createCheckedReducer} from 'redux-tcomb';
import reducers from './reducers';
import thunk from 'redux-thunk';
const createStore = (reducer) => {
const checkedReducers = createCheckedReducer(reducer, State);
const middlewareStoreCreator = composeWithDevTools(
Gopikrishna19 /
Created Feb 26, 2019
Restore deleted branch

knowing the github reference

alias gtree='git log --graph --abbrev-commit --decorate --date=relative --format=format:'\''%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'\'' --all'
Gopikrishna19 / index.js
Created May 16, 2018
Node js static http server
View index.js
const chalk = require('chalk');
const fs = require('fs');
const http = require('http');
const path = require('path');
const url = require('url');
const mimeType = {
'.html': 'text/html',
'.js': 'text/javascript',
'.css': 'text/css',
Gopikrishna19 /
Created Apr 17, 2018 — forked from ceejbot/
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

Gopikrishna19 / What to
Last active Apr 6, 2019
Android SDK Manager CLI tutorial
View What to