Skip to content

Instantly share code, notes, and snippets.

@cinco
cinco / linux-dns.md
Created June 14, 2019 01:35 — forked from roulette6/linux-dns.md
Linux managing DNS servers (LPIC-2)

Linux managing DNS servers (LPIC-2)

Quick command reference

lsb_release -d          # get Linux distro and version
cat /etc/centos-release

# ubuntu
sudo /etc/init.d/bind9 {start | stop | restart}

sudo -u bind rndc status

@cinco
cinco / monitrc
Created May 19, 2019 06:21 — forked from franck/monitrc
monit config file (nginx, mysql, redis, tomcat)
###############################################################################
## Monit control file
###############################################################################
##
## Comments begin with a '#' and extend through the end of the line. Keywords
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
##
## Below you will find examples of some frequently used statements. For
## information about the control file, a complete list of statements and
## options please have a look in the monit manual.
set alert usera@example.com
set mailserver smtp.gmail.com port 587
username "user@gmail.com"
password "password"
using TLSV1
with timeout 30 seconds
set mail-format {
from: monit@server.example.com
@cinco
cinco / monit.md
Created May 19, 2019 06:03 — forked from bpostlethwaite/monit.md
monit

monitoring shit with monit

get monit

sudo apt-get install monit

monit configuration is in ~/.monitrc

@cinco
cinco / NOTES.md
Created May 11, 2019 05:49 — forked from vik-y/NOTES.md
Docker-compose cheat sheet
@cinco
cinco / git-deployment.md
Created May 10, 2019 19:12 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@cinco
cinco / dig_cs.sh
Created April 15, 2019 12:01 — forked from tuksik/dig_cs.sh
dig cheat sheet
#Dig HowTo [https://www.madboa.com/geek/dig/]
# get the address(es) for yahoo.com
dig yahoo.com A +noall +answer
# get a list of yahoo's mail servers
dig yahoo.com MX +noall +answer
# get a list of DNS servers authoritative for yahoo.com
dig yahoo.com NS +noall +answer
@cinco
cinco / .zshrc
Created April 1, 2019 04:13 — forked from vofp/.zshrc
ZSH=$HOME/.oh-my-zsh
plugins=(git ruby rails sublime web-search)
ZSH=$HOME/.oh-my-zsh
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
@cinco
cinco / powerline.zsh-theme
Created April 1, 2019 04:12 — forked from marcadams/powerline.zsh-theme
Powerline theme for oh-my-zsh
# FreeAgent puts the powerline style in zsh !
if [ "$POWERLINE_DATE_FORMAT" = "" ]; then
POWERLINE_DATE_FORMAT=%D{%Y-%m-%d}
fi
if [ "$POWERLINE_RIGHT_B" = "" ]; then
POWERLINE_RIGHT_B=%D{%H:%M:%S}
elif [ "$POWERLINE_RIGHT_B" = "none" ]; then
POWERLINE_RIGHT_B=""
function get_os {
base=`uname`
if [ $base == 'Darwin' ]; then
brew install zsh zsh-completions;
elif [ $base == 'Linux' ]; then
os=`lsb_release -i | cut -f 2-`
if [ $os == 'Ubuntu' ]; then
sudo apt install zsh -y;
elif [ $os == 'Fedora' ]; then
sudo dnf install zsh -y;