Skip to content

Instantly share code, notes, and snippets.

Артем zveronline

Block or report user

Report or block zveronline

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
zveronline /
Created Sep 10, 2018 — forked from johnramsden/
Install scripts for installing Arch Linux on ZFS. Not runnable, just listed commands.
# Check before running, may need intervention
# Pass in the following to the script, or hardcode it.
# Uncomment if hardcoding input.
zveronline /
Created Aug 15, 2018 — forked from spalladino/
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
View Backup, restore postgres in docker container
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
zveronline / nginx.conf
Created Jan 1, 2018 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
zveronline /
Last active Jan 29, 2018 — forked from Ara4Sh/
CloudFlare A records failover script using CloudFlare api v4 ( required jq and curl to run.
# Copyright (C) 2016 Arash Shams <>.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
zveronline /
Created Dec 25, 2017 — forked from lyoshenka/
Quick and dirty DDNS using Bash and Cloudflare (API v4 compatible)
#!/usr/bin/env bash
# Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your API token is here:
# Make sure the token is the Global token, or has these permissions: #zone:read, #dns_record:read, #dns_records:edit
# Step 2: Create an A record on Cloudflare with the subdomain you chose
# Step 3: Run "./ -l" to get the zone_id and rec_id of the record you created.
# Fill in ZONE_ID and REC_ID below
# This step is optional, but will save you 2 requests every time you this script
# Step 4: Run "./". It should tell you that record was updated or that it didn't need updating.
# Step 5: Run it every hour with cron. Use the '-s' flag to silence normal output
zveronline / haproxy-cloudflare
Last active May 17, 2019 — forked from sielay/gist:0aa4077829f35f5e0310f9e0cc9fdc71
Haproxy - Capture client IP when behind CloudFlare or not. Also keep x-forwarded-for in logs
View haproxy-cloudflare
acl from_cf src -f /etc/haproxy/cf-ips-v4
reqidel ^X-Forwarded-For:.* if ! LOCALHOST
reqirep ^CF-Connecting-IP:(.*)$ X-Forwarded-For:\1 if from_cf
option forwardfor if-none
zveronline /
Created Dec 27, 2016 — forked from gaech/
Полный перенос git репозитория на другой сервер
# Клонируем исходный репозиторий без рабочего каталога (--bare)
git clone --bare
cd old-repository.git
# Делаем mirror-push(будут скопированы все ветки и тэги) в новый репозиторий
git push --mirror
cd ..
# Удаляем папку с репозиторием
You can’t perform that action at this time.