Skip to content

Instantly share code, notes, and snippets.

View avinashsivaraman's full-sized avatar
👨‍💻
Exploring

avinash avinashsivaraman

👨‍💻
Exploring
View GitHub Profile
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@avinashsivaraman
avinashsivaraman / javascript
Created September 9, 2017 05:08
To Enable CORS in express server
const express = require('express');
const cors = require('cors');
const app = express();
app.use(cors())
app.listen(8080)
// finished version of https://youtu.be/yIcve5wIuAg
function add(...args) {
function curriedAdd(...args2) {
return add(...args, ...args2)
}
curriedAdd.value = args.reduce((total, current) => total + current)
return curriedAdd
}
@avinashsivaraman
avinashsivaraman / cloudSettings
Created January 14, 2019 22:53
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-01-14T22:53:28.865Z","extensionVersion":"v3.2.4"}
@avinashsivaraman
avinashsivaraman / cloudSettings
Created January 14, 2019 22:57
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-01-14T22:56:08.424Z","extensionVersion":"v3.2.4"}

An Ultimate Cheat Sheet for Docker

Docker is a open source platform to run and ship applications. For brief introduction about the docker. Dockers mainly contains images and containers. We can create any kind of containers in different way based on the images available. We can download images from hub.docker.com. If you want to know more about docker images and container This post mainly contains most frequently used docker commands to handle containers and images By running just docker in your terminal will list down all the executable commands

docker

We can always run docker command  - help to get information about any command

Creating a Container

#process mgmt
alias process='ps aux | grep -v grep | grep '
alias c='clear'
alias cc='pbcopy <'
# npm scripts
alias ni='npm i'
alias nic='rm -rf node_modules && npm i'
import React, { useState } from "react";
import "./styles.css";
interface IState {
email: string;
password: string;
}
const defaultState: IState = { email: "", password: "" };
syntax on
set hidden
set noerrorbells
set tabstop=2 softtabstop=2
set shiftwidth=2
set expandtab
set smartindent
set nu
set relativenumber