Skip to content

Instantly share code, notes, and snippets.

View Eyakub's full-sized avatar
🐍
Python || JavaScript || Django || FastAPI

Eyakub Eyakub

🐍
Python || JavaScript || Django || FastAPI
View GitHub Profile
@Eyakub
Eyakub / pgbouncer-setup-guide.md
Created November 14, 2026 00:22
PgBouncer on one VPS — single & multiple projects (FastAPI + SQLAlchemy async + asyncpg)

PgBouncer on one VPS: single and multiple projects

A guide for apps on FastAPI + SQLAlchemy 2 (async) + asyncpg sharing one PostgreSQL server on Ubuntu. It was written after putting a production app behind PgBouncer, and it includes the problems hit along the way.


1. What PgBouncer is, and why to use it

PostgreSQL runs one OS process per connection (~5–10 MB each). max_connections defaults to 100 for the whole server, and every app's connection pool counts against it. Ten Celery workers, each holding a SQLAlchemy pool, add up quickly. On a shared box, one app spiking means another app gets too many connections.

server
{
# Listen
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
# Directory & Server Naming
server_name exapmle.com www.exapmle.com;

Free Learning Resources For Software Testers

An ongoing project to create a set of links to free online learning resources for new and experienced Software Testers (Click Readme.md to view).

Since computer science and IT university departments don't invariably offer dedicated software testing modules and resources are spread among various different providers linked to different methodologies, I created this project to help guide new testers into some sort of useful curriculum and collate some existing web-based resources into lists of links.

The rules I wish to implement are -

  1. Content must be relevant to testers
  2. Content must be informative and not overly "salesy"
  3. Content must be free of charge
@Eyakub
Eyakub / Prevent Resubmission on Refresh
Created November 19, 2019 05:50
I've faced a lot this issue, finally I got this issue solved by the following code.
<script>
if ( window.history.replaceState ) {
window.history.replaceState( null, null, window.location.href );
}
</script>
## Steps for React native
`
- react-native init projectName
- react-native run-android
`
@Eyakub
Eyakub / flutter.md
Created May 26, 2019 07:32 — forked from matteocrippa/flutter.md
Flutter Cheatsheet

Flutter

A quick cheatsheet of useful snippet for Flutter

Widget

A widget is the basic type of controller in Flutter Material. There are two type of basic Widget we can extend our classes: StatefulWidget or StatelessWidget.

Stateful

StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:

@Eyakub
Eyakub / Linux_Custom_myself.md
Last active February 7, 2023 08:25
A few important notes for Ubuntu and Django setup on Ubuntu 16.04, Installing pip3, Virtualenv, how to activate and deactivate

Install Python 3.7.3

  $ sudo apt update
  $ sudo apt install software-properties-common
  $ sudo add-apt-repository ppa:deadsnakes/ppa
  $ sudo apt install python3.7
  $ sudo apt-get install python3.7-venv
  $ python3.7 -V
@Eyakub
Eyakub / docker-help.md
Created May 16, 2019 09:33 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@Eyakub
Eyakub / vscode_shortcuts.md
Created May 16, 2019 09:33 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

  • For mac, replace "Ctrl" with "cmd" and "Alt" with "option"

Official List of all commands