Skip to content

Instantly share code, notes, and snippets.

View masudcsesust04's full-sized avatar
🏣
Working from office

Md Masud Rana masudcsesust04

🏣
Working from office
  • Dhaka, Bangladesh
  • 00:24 (UTC +06:00)
View GitHub Profile
@masudcsesust04
masudcsesust04 / puma.service
Created July 8, 2021 16:00 — forked from arteezy/puma.service
Manage Puma with systemd and rbenv
[Unit]
Description=Puma Rails Server
After=network.target
[Service]
Type=simple
User=deploy
WorkingDirectory=/home/deploy/app/current
ExecStart=/home/deploy/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/app/shared/config/puma.rb
ExecStop=/home/deploy/.rbenv/bin/rbenv exec bundle exec pumactl -S /home/deploy/app/shared/tmp/pids/puma.state stop
@masudcsesust04
masudcsesust04 / netrw quick reference.md
Created June 4, 2020 20:28 — forked from t-mart/netrw quick reference.md
A quick reference for Vim's built-in netrw file selector.
Map Action
<F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- Makes Netrw go up one directory
a Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory
C Setting the editing window
d Make a directory
@masudcsesust04
masudcsesust04 / install_monaco_font.sh
Created February 28, 2020 19:47 — forked from rogerleite/install_monaco_font.sh
Install Monaco font in Linux
#!/bin/bash
# Install Monaco font in Linux
# Version from nullvideo https://gist.github.com/rogerleite/99819#gistcomment-2799386
sudo mkdir -p /usr/share/fonts/truetype/ttf-monaco && \
sudo wget https://gist.github.com/rogerleite/b50866eb7f7b5950da01ae8927c5bd61/raw/862b6c9437f534d5899e4e68d60f9bf22f356312/mfont.ttf -O - > \
/usr/share/fonts/truetype/ttf-monaco/Monaco_Linux.ttf && \
sudo fc-cache
@masudcsesust04
masudcsesust04 / nginx_blog.conf
Created August 20, 2019 10:49 — forked from lukeburden/nginx_blog.conf
Nginx Reverse Proxy for Wordpress with Caching
proxy_cache_path /var/nginx/cache levels=1:2 keys_zone=blog_cache:1m max_size=100m inactive=60m use_temp_path=off;
server{
listen 80;
server_name example.com;
# prevent forwarding of cookies
proxy_set_header Cookie "";
# prevent passing of WP cookie back to client
@masudcsesust04
masudcsesust04 / nginxproxy.md
Created August 1, 2019 11:59 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@masudcsesust04
masudcsesust04 / nginx-tuning.md
Created July 24, 2019 05:27 — 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.

@masudcsesust04
masudcsesust04 / .dockerignore
Created September 6, 2018 12:41 — forked from davidderus/.dockerignore
Docker + Rails + Puma + Postgres + Nginx
.git
.gitignore
/doc
.yardoc
coverage
jsdoc
/tmp
/log
Dockerfile
Dockerfile.prod

1xx Informational

Status Code Status Message Symbol
100 Continue :continue
101 Switching Protocols :switching_protocols
102 Processing :processing

2xx Success

Status Code Status Message Symbol