Skip to content

Instantly share code, notes, and snippets.

View ironheart122's full-sized avatar
🎯
I may be slow to respond.

ironheart122 ironheart122

🎯
I may be slow to respond.
View GitHub Profile
@ironheart122
ironheart122 / nginx-tuning.md
Created April 15, 2019 20:14 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@ironheart122
ironheart122 / mongoDump.md
Created April 30, 2019 11:33 — forked from JaniAnttonen/mongoDump.md
Export Docker MongoDB collection as a JSON file

First, find the container that runs your MongoDB and ssh into it.

Then, find the collection you want to export:

mongo
show dbs
use <database>
show collections
exit
@ironheart122
ironheart122 / docker-it.sh
Created May 20, 2019 14:45 — forked from mattgrayisok/docker-it.sh
A simple script to install docker on a server
#!/bin/sh
curl https://get.docker.com | sh
sudo curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo usermod -aG docker $USER
echo "****************"
echo "* Docker and docker-compose have been installed"
echo "* The current user has been added to the docker group"
echo "* Close and restart this session or run 'su - $USER' to refresh your active groups"
echo "****************"
@ironheart122
ironheart122 / gist:eefb93d9cbabe0d9dae681ffd1384be2
Last active October 31, 2019 06:15
Master New 52 Reading Order (comicbookreadingorders - Last updated - October 2019)
Dial H #0
Demon Knights #0
Demon Knights #1 (2011)
Demon Knights #2
Demon Knights #3
Demon Knights #4
Demon Knights #5
Demon Knights #6
Demon Knights #7
Demon Knights #8
@ironheart122
ironheart122 / New 52 - Reading Order Part One
Created October 30, 2019 19:34
New 52 Reading Order - Part One (October 2019) - Edited by me
Batman/Superman #1 (2013)
Batman/Superman #2
Batman/Superman #3
Batman/Superman #4
Swamp Thing Vol. 5 #0
Aquaman Vol. 7 #0
Nightwing Vol. 3 #0
Action Comics Vol. 2 #1 (2011)
Action Comics Vol. 2 #2
Action Comics Vol. 2 #3
@ironheart122
ironheart122 / New 52 - Reading Order Part Two
Last active October 31, 2019 06:15
New 52 - Reading Order Part Two (October 2019) - Edited by me
Justice League Dark #9
Justice League Dark #10
Justice League Dark #11
Justice League Dark #12
Justice League Dark #13
Justice League Dark Annual #1 (2012)
Justice League Vol. 2 #8
Justice League Dark #14
Justice League Dark #15
Justice League Dark #16
@ironheart122
ironheart122 / CONTRIBUTING.md
Created March 4, 2020 16:22
Contributor guide (Moncy Gopalan)

Project Contributor Guide

Style guide

The codebase adheres to the following style guides and is enforced using ESLINT:

#!/bin/sh
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
if [ 'master' = ${current_branch} ]
then
echo "ERROR: Not allowed to push to master."
exit 1;
else
exit 0;
@ironheart122
ironheart122 / restore.sh
Created January 5, 2021 09:03 — forked from jgillman/restore.sh
pg_restore a local db dump into Docker
# Assumes the database container is named 'db'
DOCKER_DB_NAME="$(docker-compose ps -q db)"
DB_HOSTNAME=db
DB_USER=postgres
LOCAL_DUMP_PATH="path/to/local.dump"
docker-compose up -d db
docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}"
docker-compose stop db
@ironheart122
ironheart122 / restore.sh
Created January 5, 2021 09:03 — forked from jgillman/restore.sh
pg_restore a local db dump into Docker
# Assumes the database container is named 'db'
DOCKER_DB_NAME="$(docker-compose ps -q db)"
DB_HOSTNAME=db
DB_USER=postgres
LOCAL_DUMP_PATH="path/to/local.dump"
docker-compose up -d db
docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}"
docker-compose stop db