This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/logrotate.d/mongod.conf | |
``` | |
/var/log/mongodb/mongod.log { | |
daily | |
size 100M | |
rotate 7 | |
missingok | |
compress | |
delaycompress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### MongoDB Backup | |
---- | |
**Shell Script / Cron Job** | |
File : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# netplan2NM.sh | |
# Ubuntu server 20.04 Change from netplan to NetworkManager for all interfaces | |
echo 'Changing netplan to NetowrkManager on all interfaces' | |
# backup existing yaml file | |
cd /etc/netplan | |
cp 01-netcfg.yaml 01-netcfg.yaml.BAK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# run: "apt list --installed | tail -n +2 > file.list" on each computer | |
# name them: compare_one.list and compare_two.list | |
use strict; | |
use warnings; | |
my $num_args = $#ARGV + 1; | |
my $file_one="compare_one.list"; | |
my $file_two="compare_two.list"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# =================================== | |
# ########## Bash Colours ########### | |
# =================================== | |
NC='\033[31;0m' # no colors or formatting | |
RED='\033[0;31;1m' # print text in bold Red | |
GRE='\033[0;32;1m' # print text in bold Green | |
YEL='\033[0;33;1m' # print text in bold Yellow | |
BLU='\033[0;34;1m' # print text in bold Blue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# =================================== | |
# ########## Bash Colours ########### | |
# =================================== | |
NC='\033[31;0m' # no colors or formatting | |
RED='\033[0;31;1m' # print text in bold Red | |
GRE='\033[0;32;1m' # print text in bold Green | |
YEL='\033[0;33;1m' # print text in bold Yellow | |
BLU='\033[0;34;1m' # print text in bold Blue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# =================================== | |
# ########## Bash Colours ########### | |
# =================================== | |
NC='\033[31;0m' # no colors or formatting | |
RED='\033[0;31;1m' # print text in bold Red | |
GRE='\033[0;32;1m' # print text in bold Green | |
YEL='\033[0;33;1m' # print text in bold Yellow | |
BLU='\033[0;34;1m' # print text in bold Blue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Woocommerce USPS Shipping Method remove flat rate envelopes | |
* Plugin URI: https://tcdesignio.co.uk | |
* Description: <code>Woocommerce USPS Shipping Method remove flat rate envelopes <strong> - TCDESIGN</strong></code> | |
* Version: 1.0.0 | |
* Tested up to: 6.0 | |
*/ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "$#" -ne "1" ]; then | |
echo "usage :" | |
echo " $0 <amd64|i386>" | |
elif ! [ "$1" = "amd64" ] && ! [ "$1" = "i386" ]; then | |
echo "Bad architecture argument. First and only argument must be amd64 or i386." | |
else | |
mkdir "tmplibdb" && cd "tmplibdb" | |
if [ "$1" = "amd64" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $ssl_client_s_dn $ssl_client_s_dn_cn { | |
default ""; | |
~/CN=(?<CN>[^/]+) $CN; | |
} | |
server { | |
listen 80; | |
listen [::]:80; | |
listen 443 ssl; |
NewerOlder