Skip to content

Instantly share code, notes, and snippets.

View mbredikhin's full-sized avatar
:shipit:

Maxim Bredikhin mbredikhin

:shipit:
View GitHub Profile
set -g mouse on
set -ga terminal-overrides ',*256color*:smcup@:rmcup@'
set-option -sg escape-time 10
set-option -g focus-events on
set-option -g default-terminal "screen-256color"
set-option -ga terminal-overrides ',xterm-256color:Tc'
bind c new-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
@mbredikhin
mbredikhin / gist:0b5a1f5ab62959d21be3a3d621c75bb6
Created March 9, 2025 19:35
Add letsencrypt cert with autorenewal everyday at 3:00 AM
sudo certbot --nginx -d yourdomain.com
sudo crontab -e
0 3 * * * certbot renew --quiet
server {
server_name *hostname*;
# Static assets
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg)$ {
proxy_pass http://localhost:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@mbredikhin
mbredikhin / nginx_basics.md
Created September 14, 2022 16:12 — forked from leommoore/nginx_basics.md
Nginx Basics

#Nginx Basics for Ubuntu

Please see http://wiki.nginx.org/Main for more information. See http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/ for a tutorial on how to install Nginx.

##Installation To install, you can install the version which is in the standard Ubuntu repositories but it is normally quite old and will not have the latest security patches. The best way is to update the repositories first:

apt-get update
apt-get install python-software-properties

apt-get upgrade

@mbredikhin
mbredikhin / .vimrc
Last active March 24, 2023 19:24
vim config
call plug#begin('~/.vim/plugged')
Plug 'ctrlpvim/ctrlp.vim'
Plug 'fatih/vim-go', { 'tag': '*' }
Plug 'cocopon/iceberg.vim'
Plug 'tpope/vim-surround'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'