Skip to content

Instantly share code, notes, and snippets.

View aabele's full-sized avatar
🏠

Aivis aabele

🏠
View GitHub Profile
@luckydev
luckydev / gist:b2a6ebe793aeacf50ff15331fb3b519d
Last active October 22, 2022 14:03
Increate max no of open files limit in Ubuntu 16.04/18.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf
@matthias-chlechowitz
matthias-chlechowitz / gist:8b1d2be2923af248dd0f2e2cb201437c
Created September 14, 2016 16:02
remove fragment from file path in nginx location block
call:
$domain/sym_assets/**/*.jpg
desired result:
$root_dir/path/on/server/**/*.jpg
$root is different than place on server
location ~ /sym_assets {
rewrite ^/sym_assets(/.*)$ $1 last;
@aabele
aabele / gist:a7ff7a5337dbcb8788faf2e64db60f21
Created June 30, 2016 09:42
Elasticsearch downgrade on CentOS 6
service elasticsearch stop
yum list installed | grep elastic
yum remove elasticsearch.noarch
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.0.noarch.rpm
yum install elasticsearch-1.7.0.noarch.rpm
rm /var/lock/subsys/elasticsearch -Rf
rm -Rf /var/lib/elasticsearch/*
service elasticsearch start
curl -XGET '127.0.0.1:9200'
@aabele
aabele / gist:7f86d672779719685acc
Created June 9, 2014 07:58
How to push code to review board.
rbt post -o --guess-summary --guess-description --tracking-branch=origin/master