Skip to content

Instantly share code, notes, and snippets.

Gani Rakhmatov rahmatov

Block or report user

Report or block rahmatov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@1hakr
1hakr / example.com
Last active Nov 14, 2019
Supercharge your NGIX config
View example.com
proxy_cache_path /tmp/cacheapi levels=1:2 keys_zone=microcacheapi:100m max_size=1g inactive=1d use_temp_path=off;
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name example.com;
location /api/ {
# Rate Limiting
limit_req zone=reqlimit burst=20; # Max burst of request
View gist:620390b5c1a83893d4e525c112b6e595
#!/bin/bash
#
# # # # # # # # # # НАСТРОЙКИ ДОСТУПА К MYSQL # # # # # # # # # #
MYSQL_SERVER=localhost
MYSQL_USER=root
MYSQL_PASSWORD=password
MYSQL_DATABASES="--all-databases"
# Yandex.Disk настройки (как получить - см. https://oauth.yandex.ru/ и https://oauth.yandex.ru/authorize?response_type=token&client_id=?)
@jacefreeman
jacefreeman / gist:a83d0e95ce1c1dc949fe72284d04f265
Created Apr 14, 2017
Vyos OpenVPN Client Configuration for ExpressVPN
View gist:a83d0e95ce1c1dc949fe72284d04f265
# Download the OVPN file from ExpressVPN for the server you wish to access https://www.expressvpn.com/setup#manual
# Create files for certs and keys, use vi or nano, example is vi
cd /config/auth
sudo vi ca.cert
# type i and paste in your client certificate after <cert> up to </cert>
# type :wq
sudo vi cert.crt
# type i and paste in your certificate authority after <ca> up to </ca>
@pauloricardomg
pauloricardomg / cors.nginxconf
Last active Oct 6, 2019
Nginx configuration for CORS-enabled HTTPS proxy with origin white-list defined by a simple regex
View cors.nginxconf
#
# Acts as a nginx HTTPS proxy server
# enabling CORS only to domains matched by regex
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/
#
# Based on:
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html
# * http://enable-cors.org/server_nginx.html
#
server {
@aktau
aktau / ffmpeg-interlace-test.sh
Last active May 18, 2019
ffmpeg detect interlacing
View ffmpeg-interlace-test.sh
#!/bin/bash
# for a blogpost on this, check: http://www.aktau.be/2013/09/22/detecting-interlaced-video-with-ffmpeg/
# detect interlacing with the ffmpeg "idet" filter, the longer
# you let this run, the better, though it's never 100% accurate
# flags:
# -an = discard audio, we don't need it
# -f rawvideo = output raw video
You can’t perform that action at this time.