Skip to content

Instantly share code, notes, and snippets.

View jaddek's full-sized avatar
👨‍💻

Tony Nazarov jaddek

👨‍💻
  • 12:23 (UTC +13:00)
View GitHub Profile
@jaddek
jaddek / .gitignore Java
Created September 8, 2024 21:13 — forked from dedunumax/.gitignore Java
A complete .gitignore file for Java.
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
@jaddek
jaddek / nginx-tuning.md
Created September 16, 2021 07:29 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

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.

@jaddek
jaddek / install-certs.sh
Created March 11, 2021 17:12
Setup certs for docker app
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
if ! command -v mkcert &>/dev/null; then
echo "\033[41mUtil mkcert should be installed to configure the certificate\033[0m"
echo "\033[31mYou can find it here: https://github.com/FiloSottile/mkcert\033[0m"
exit
fi
@jaddek
jaddek / aws-backup-pgsql-db.sh
Last active March 11, 2021 17:13
Hotkey gist for db dump
#!/bin/bash
PROJECT=
FIRST_DATABASE=
SECOND_DATABASE=
S3_BUCKET=
backup_date=$(date +"%d-%m-%Y")
backup_dir=/var/local/"${PROJECT}"/"${backup_date}"
@jaddek
jaddek / setup_mailcatcher.sh
Created April 27, 2018 13:24 — forked from shark0der/setup_mailcatcher.sh
Mailcatcher installation script for Ubuntu 16.04 (14.04 commands commented out)
#!/bin/bash
# Install dependencies
# older ubuntus
#apt-get install build-essential libsqlite3-dev ruby1.9.1-dev
# xenial
apt install build-essential libsqlite3-dev ruby-dev
# Install the gem
gem install mailcatcher