Skip to content

Instantly share code, notes, and snippets.

View oneshot719's full-sized avatar
💭
I might be working, but I'm probably not.

Matt Lucas oneshot719

💭
I might be working, but I'm probably not.
View GitHub Profile
#!/usr/bin/python
import csv
import json
import re
import datetime
import sys, getopt
############
This restores user accoutns and 2 factor authentication without touching the girlab.rb file
so that you can have 2 live production sites OR a hot backup.
-------------------------
[gitlab restore.sh]
gitlab-ctl stop
touch /etc/gitlab/skip-auto-migrations
matt@matt# show firewall
all-ping enable
broadcast-ping disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name WAN_IN {
default-action drop
description ""
@oneshot719
oneshot719 / centos7_timechine.sh
Last active November 26, 2022 22:55 — forked from darcyliu/centos7_timechine.sh
Install Time Machine service on CentOS 7
# Install Time Machine service on CentOS 7
# http://netatalk.sourceforge.net/wiki/index.php/Netatalk_3.1.7_SRPM_for_Fedora_and_CentOS
# http://confoundedtech.blogspot.com/2011/07/draft-draft-ubuntu-as-apple-time.html
yum install -y rpm-build gcc make wget
# install netatalk
yum install -y avahi-devel cracklib-devel dbus-devel dbus-glib-devel libacl-devel libattr-devel libdb-devel libevent-devel libgcrypt-devel krb5-devel mysql-devel openldap-devel openssl-devel pam-devel quota-devel systemtap-sdt-devel tcp_wrappers-devel libtdb-devel tracker-devel
yum install -y bison docbook-style-xsl flex dconf
0 01 * * * rsync -avx --progress /mnt/NFS/CARTOONS/ /mnt/PLEX/CARTOONS/ >> /var/log/rsync.log
0 04 * * * rsync -avx --progress /mnt/NFS/MOVIES/ /mnt/PLEX/MOVIES/ >> /var/log/rsync.log
0 08 * * * rsync -avx --progress /mnt/NFS/TV-SHOWS/ /mnt/PLEX/TV-SHOWS/ >> /var/log/rsync.log
0 12 * * * rsync -avx --progress /mnt/NFS/TRAINING/ /mnt/PLEX/TRAINING/ >> /var/log/rsync.log
0 14 * * * rsync -avx --progress /mnt/NFS/MUSIC/ /mnt/PLEX/MUSIC/ >> /var/log/rsync.log