Skip to content

Instantly share code, notes, and snippets.

View InclinedScorpio's full-sized avatar
:octocat:
Pochemuchka

Ashutosh Tiwari InclinedScorpio

:octocat:
Pochemuchka
View GitHub Profile
@InclinedScorpio
InclinedScorpio / typescript-docker-Dockerfile
Created January 11, 2022 19:34
Nodejs Typescript Dockerfile
# stage 1 building the code, dev dependencies will be required (convert TS -> JS)
FROM node as builder
WORKDIR /usr/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# stage 2, now as build is created, copy it from stage 1 and use it with prod dependencies
FROM node
@InclinedScorpio
InclinedScorpio / postgres-training.txt
Created January 6, 2022 20:10
Understanding Postgres - Roles, Groups, Users, Privileges
Users, groups, and roles
user groups and roles are synonyms.
Create user = create role+ login permission
To create a PostgreSQL user
postgres=# create user appuser1 with password 'password';
or
postgres=# create role appuser_role2 with login password 'password';
Note :All new users and roles inherit permissions from the public role.
@InclinedScorpio
InclinedScorpio / docker_prometheus_grafana_exporter.md
Last active October 24, 2021 19:56
Docker | Prometheus | Grafana | Node Exporter Integration

We will be using Docker to run the applications. Let's start!

Node Exporter

Setting up Node Exporter

  1. Run the following docker command:
@InclinedScorpio
InclinedScorpio / TicTacToe.py
Created June 27, 2018 18:18
Tic Tac Toe GAme
def display_board(board):
print("\n")
print("\n")
print("\n")
print("\n")
print("\n")
print("\n")
print("\n")
print("\n")
print("\n")