Skip to content

Instantly share code, notes, and snippets.

View vanzhiganov's full-sized avatar

Vyacheslav Anzhiganov vanzhiganov

View GitHub Profile
@saketj
saketj / kerberos_setup.md
Last active July 6, 2024 00:43 — forked from ashrithr/kerberos_setup.md
Set up kerberos on Redhat/CentOS 7

Installing Kerberos on Redhat 7

This installation is going to require 2 servers one acts as kerberos KDC server and the other machine is going to be client. Lets assume the FQDN's are (here cw.com is the domain name, make a note of the domain name here):

  • Kerberos KDC Server: kdc.cw.com
  • Kerberos Client: kclient.cw.com

Important: Make sure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in

@joseluisq
joseluisq / mysql_query_log.md
Last active May 24, 2024 07:31
How to enable the MySQL/MariaDB general query logs

How to enable the MySQL/MariaDB general query logs

  1. Enter to MySQL/MariaDB server command-line tool (change root with your username and password):
mysql -u root -proot
  1. Set the general log file path:
SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';
@denji
denji / README.md
Last active August 22, 2024 22:34 — forked from Cubixmeister/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@so0k
so0k / kubectl.md
Last active September 11, 2024 08:36
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@neutronth
neutronth / letsencrypt-auto-renew
Last active February 19, 2017 12:44
Let's Encrypt auto renew script
#/bin/sh
OPTS=$(getopt -o cehw: --long config:,expire-limit:,help,webservice: -n "$0" -- "$@")
if [ $? != 0 ]; then
echo "Terminating ..." >&2
exit 1
fi
CONFIG=/etc/letsencrypt/cli.ini
WEBSERVICE=nginx
@barroco
barroco / raven-shell
Last active May 4, 2024 11:25
Send Sentry error from shell using curl
#!/bin/sh
SENTRY_KEY=
SENTRY_SECRET=
SENTRY_PROJECTID=1
SENTRY_HOST=sentry.example.com
SCRIPT_ARGUMENTS=$@
capture_error()
{
@akkaash
akkaash / ansible_folder_structure
Created January 27, 2015 18:03
Create Simple ansible folder structure
mkdir -p $PROJECT_NAME/roles/{web,db}/{tasks,handlers,templates}
touch $PROJECT_NAME/main.yml $PROJECT_NAME/roles/{web,db}/{tasks,handlers,templates}/main.yml
@sjjohansen
sjjohansen / mock_for_rpms.txt
Created October 19, 2014 22:39
Setup Mock for rpm builds
# pre-req packages
yum -y groupinstall "Development Tools"
yum -y install yum-utils
yum -y install epel-release
yum -y install mock rpm-build
yum -y install wget
yum -y install createrepo
@alexflint
alexflint / make_video.py
Last active November 10, 2021 16:36
Create a video from a sequence of images (or PDFs) in python (using ffmpeg internally)
import os
import sys
import tempfile
import argparse
import subprocess
NATURAL_FPS = 30.
# Formats convertible by imagemagick:
CONVERTIBLE_EXTENSIONS = ['png', 'jpeg', 'jpg', 'pdf', 'pgm', 'bmp']
@elliottb
elliottb / fabfile.py
Created December 2, 2013 02:26
Example Python Fabric deployment script. Deploys code from a deployment box to a remote host. Usage from command line on the deployment box: fab deploy.
from fabric.api import local, run, env, put
import os, time
# remote ssh credentials
env.hosts = ['10.1.1.25']
env.user = 'deploy'
env.password = 'XXXXXXXX' #ssh password for user
# or, specify path to server public key here:
# env.key_filename = ''