Skip to content

Instantly share code, notes, and snippets.

@naveenlr92
naveenlr92 / pcat
Created December 10, 2021 12:06 — forked from nopolabs/pcat
sudo apt-get install python-pygments && alias pcat="pygmentize -f terminal256 -O style=native -g"
@naveenlr92
naveenlr92 / ansible-role-test.sh
Created August 14, 2021 10:30 — forked from geerlingguy/ansible-role-test.sh
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
@naveenlr92
naveenlr92 / bindify.py
Created February 25, 2021 20:42 — forked from gmr/bindify.py
Convert tinydns zone files to bind
#!/usr/bin/env python
import collections
import datetime
from os import path
import pickle
import sys
if len(sys.argv) < 2:
print('Usage: bindify.py zonefile')
@naveenlr92
naveenlr92 / gitlab-backup.sh
Created October 10, 2020 09:49 — forked from balajidl/gitlab-backup.sh
Run gitlab backup script, upload repo and folders to s3, log and inform via sendgrid email
LOGFILE="/var/log/gitlab-backup.log"
echo "**************START*************************" >> $LOGFILE
#---------1. GITLAB git repos backup ---------
echo "Start the gitlab backup process" >> $LOGFILE
/opt/gitlab/bin/gitlab-rake gitlab:backup:create SKIP=uploads >> $LOGFILE
echo "git backup done" >> $LOGFILE
echo "Now, uploading gitlab repo to s3" >> $LOGFILE