Skip to content

Instantly share code, notes, and snippets.

@RamazanBIYIK
RamazanBIYIK / gist:61223ddd8a897094fd2f0a7153fbf5fa
Last active August 1, 2019 07:17
NGINX- Add username and password to nginx
Apache htpasswd generator indir.
Bir .htpasswd dosyası generate et.
location / {
# stub_status on;
#auth_basic "Kısıtlı alan";
#auth_basic_user_file /etc/nginx/htpasswd/.htpasswd;
#Eğer yukardaki 2 satırı aktif yaparsan şifreleme(özünde hashing) aktif oluyor.
#Yeni kullanıcı ve şifre tanımlamak için: htpasswd -c /etc/nginx/htpasswd/.htpasswd kullanıcıadi
#Bir yukarıdaki komut .htpasswd dosyasında ismine ve şifrene göre hashing yapıyor. Burada hash kodunu görebilirsin.
@RamazanBIYIK
RamazanBIYIK / gist:6a7a2c6434b97ac7c4c02cc1ecc1ac14
Created August 1, 2019 07:19
Go- add go to global path temporarily
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
@RamazanBIYIK
RamazanBIYIK / New CentosOS network up
Created September 2, 2019 07:55
Newly created centos minimal have no network configuration. You need do it by manually,
ip link set dev {devicename} up
dhclient -v {devicename}
Device name can be found with "service --status-all"