Skip to content

Instantly share code, notes, and snippets.

View Dzhan85's full-sized avatar

Atadzhan Dzhan85

View GitHub Profile
@Dzhan85
Dzhan85 / SRX cheatsheet
Created May 23, 2017 00:56 — forked from adionditsak/SRX cheatsheet
Juniper SRX cheatsheet
# Juniper SRX cheatsheet
#Help
help
<command> ?
#Show
show configuration
@Dzhan85
Dzhan85 / README.md
Created December 20, 2017 01:32 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@Dzhan85
Dzhan85 / rules-both.iptables
Created August 29, 2018 18:36 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <[email protected]>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@Dzhan85
Dzhan85 / setup-kubernetes-ubuntu-16.md
Created December 8, 2019 13:56 — forked from TRoetz/setup-kubernetes-ubuntu-16.md
Install a 3 Node Kubernetes Cluster on Ubuntu 18.04

Master: Dependencies

DISABLE SWAP: This is how to disable the swap file in Ubuntu 17.04

To turn off the swapfile. Run the following command:

sudo swapoff /swapfile

Now disable the swap file in /etc/fstab. I'm using Vim.

@Dzhan85
Dzhan85 / gitlab-backup.sh
Created April 21, 2020 08:14 — forked from devopstaku/gitlab-backup.sh
A script to backup GitLab repositories.
#!/bin/bash
# A script to backup GitLab repositories.
GLAB_BACKUP_DIR=${GLAB_BACKUP_DIR-"gitlab_backup"} # where to place the backup files
GLAB_TOKEN=${GLAB_TOKEN-"YOUR_TOKEN"} # the access token of the account
GLAB_GITHOST=${GLAB_GITHOST-"gitlab.com"} # the GitLab hostname
GLAB_PRUNE_OLD=${GLAB_PRUNE_OLD-true} # when `true`, old backups will be deleted
GLAB_PRUNE_AFTER_N_DAYS=${GLAB_PRUNE_AFTER_N_DAYS-7} # the min age (in days) of backup files to delete
GLAB_SILENT=${GLAB_SILENT-false} # when `true`, only show error messages
GLAB_API=${GLAB_API-"https://gitlab.com/api/v3"} # base URI for the GitLab API
@Dzhan85
Dzhan85 / private-docker-regs-with-free-tiers.markdown
Created April 22, 2020 08:36 — forked from JakubOboza/private-docker-regs-with-free-tiers.markdown
Private Docker registry with free tiers for Developers.

List of sites with free tier limits

  • Docker Hub - One private repo/image spot for free
  • Three Scale - Very generous free tier 50GB of space, 500 Pulls a month etc..
  • Canister - 20 private repos with almost no limits on free tier
  • Code Fresh - Free tier for developers

Setup your own private registry

@Dzhan85
Dzhan85 / Cheatsheet
Created June 12, 2020 09:43 — forked from PierreZ/Cheatsheet
CISCO Cheat sheet
#configuration of router
conf t
hostname ""
enable secret ""
line console 0
logging synchronous
password ""
login
exit
line vty 0 4

IPTables setup for a Linux-based Router

The following script will set the router's firewall to reject every thing coming from the WAN, while forwarding all the traffic from LAN to WAN.

#!/bin/sh

PATH=/usr/sbin:/sbin:/bin:/usr/bin

WAN=enp2s0
@Dzhan85
Dzhan85 / net.sh
Created August 13, 2020 07:20 — forked from goffinet/net.sh
Centos7 router config iptables/ip6tables/ifcg-files
#!/bin/bash
ip4="192.168.168"
ip6="fd00:168:168"
lan="eth0"
wan="eth1"
1_interfaces () {
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="no"
@Dzhan85
Dzhan85 / firewall.iptables.txt.txt
Created August 13, 2020 07:36 — forked from anonymous/firewall.iptables.txt.txt
firewall.iptables.txt
echo "Обнуляем правила"
iptables -X
iptables -t nat -X
iptables -F
iptables -t nat -F
echo "Блокируем весь трафик"
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP