Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
In Quarantine

Shivam Agrawal shivampip

🏡
In Quarantine
View GitHub Profile
View .dockerignore
**/node_modules
**/npm-debug.log
build
View shape_divider
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shapre Divider Test</title>
</head>
<style>
@shivampip
shivampip / postgresql.md
Last active Oct 13, 2021
Postgresql Ubuntu Configuration
View postgresql.md

After INstallation

  • Switch to postgres user
su - postgres
  • Create new user name root (for example)
createuser --interactive --pwprompt
@shivampip
shivampip / nginx_wildcard.conf
Created Dec 4, 2020
Nginx wildcard subdomain to folder
View nginx_wildcard.conf
server{
listen 80;
server_name ~^(?<subdomain>.*)\.yoursite\.com$;
root /var/www/project/sites/$subdomain;
index index.html;
}
@shivampip
shivampip / supervisord.md
Last active Dec 30, 2020
Supervisord Cheetsheet
View supervisord.md

Supervisord

Installation

sudo apt-get install supervisor

Configuration file

  • For any new process create a supervisor config file
  • path will be /etc/supervisor/conf.d/myfile.conf
View bash_cheatsheet.sh
#! /bin/bash
# ==============
# Thanskyou Brad
# https://gist.github.com/bradtraversy/ac3b1136fc7d739a788ad1e42a78b610
#
# Create this file executable by
# chmod +x bash_cheetsheet.sh
#
# Run this file by
View git_branch.md
  • Show list of branchs
git branch -a
  • Create branch
git branch new-branch
  • Switch to new-branch
@shivampip
shivampip / fa-react-bundle.txt
Last active Nov 6, 2020
FontAwesome React Bundle Size
View fa-react-bundle.txt
NORMAL
125.45 KB build\static\js\2.dab67ae7.chunk.js
95.55 KB build\static\css\3.9a3bfdef.chunk.css
64.95 KB build\static\js\3.4960ab7f.chunk.js
19.71 KB build\static\js\4.bcc0d427.chunk.js
1.95 KB build\static\css\4.86527f64.chunk.css
1.49 KB build\static\js\runtime-main.ce1b1f56.js
1.07 KB build\static\css\2.c7d94637.chunk.css
650 B build\static\js\main.66091139.chunk.js
72 B build\static\css\main.2e0c8924.chunk.css
@shivampip
shivampip / rabbitmq.md
Created Aug 4, 2020
RabbitMQ Erlang Installation
View rabbitmq.md
@shivampip
shivampip / Flask.md
Created Jul 31, 2020
Flask Cheetsheet
View Flask.md

Run it

  • on Windows (powershell)
$env:FLASK_APP = "hello.py"
  • on Linux
export FLASK_APP=hello.py

Then run with