Skip to content

Instantly share code, notes, and snippets.

View shivampip's full-sized avatar
🏡
In Quarantine

Shivam Agrawal shivampip

🏡
In Quarantine
View GitHub Profile
@shivampip
shivampip / nginx_wildcard.conf
Created December 4, 2020 21:00
Nginx wildcard subdomain to folder
server{
listen 80;
server_name ~^(?<subdomain>.*)\.yoursite\.com$;
root /var/www/project/sites/$subdomain;
index index.html;
}
@shivampip
shivampip / bash_cheatsheet.sh
Last active December 4, 2020 17:41
Bash Cheatsheet
#! /bin/bash
# ==============
# Thanskyou Brad
# https://gist.github.com/bradtraversy/ac3b1136fc7d739a788ad1e42a78b610
#
# Create this file executable by
# chmod +x bash_cheetsheet.sh
#
# Run this file by
@shivampip
shivampip / git_branch.md
Last active November 23, 2020 18:26
Git Branch
  • 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 November 6, 2020 15:34
FontAwesome React Bundle Size
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 August 4, 2020 09:26
RabbitMQ Erlang Installation
@shivampip
shivampip / Flask.md
Created July 31, 2020 17:35
Flask Cheetsheet

Run it

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

Then run with

@shivampip
shivampip / pypi_package.md
Last active July 16, 2020 07:09
Publish Python Package

Installation

pip install --upgrade setuptools wheel
pip install --upgrade twine
  • Must have account on PyPi

Initial setup

  • Create this hirercy
@shivampip
shivampip / react_app_on_gh_pages.md
Last active July 9, 2020 11:39
Deploy React App on Github Pages

Deploy React App on Github Pages

  • My github username is shivampip, in below steps, replace it with yours
  • Say you have a react app named ghtest
  • Create new repo on github with same name as react app. i.e. ghtest
  • Now on local react app repo, install gh-pages module
npm install --save gh-pages
  • Now in package.json, add these line below name
@shivampip
shivampip / settings.json
Created May 22, 2020 04:35
VS Code Pretier Tab problem
"editor.insertSpaces": false,
"editor.tabSize": 4,
"editor.detectIndentation": false,
"prettier.tabWidth": 4,
"prettier.useTabs": true // This made it finally work for me
@shivampip
shivampip / Python_Virtual_Evn.md
Last active April 12, 2020 08:02
Python Virtual Environment
  • Install virtual env
pip install virtualenv
  • Go to your project directory
cd project
  • Create virtual env