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 | |
| # | |
| # Check mounted partitions' usage space on an EC2 instance and alert thru AWS SNS if it's greater than MAX_USAGE percents | |
| # | |
| #-- Set the SNS topic ARN here | |
| TOPIC_ARN="" | |
| MAX_USAGE=90 | |
| [ "$TOPIC_ARN" = "" ] && { echo "SNS topic ARN is not set, exiting.."; exit; } |
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
| --- kamailio.ORG 2018-02-26 15:44:04.000000000 +0000 | |
| +++ kamailio 2019-06-14 12:34:20.000000000 +0000 | |
| @@ -48,11 +48,16 @@ | |
| if [ "$1" != "debug" ]; then | |
| check_fork | |
| fi | |
| + echo -n $"Updating $PROG public IP: " | |
| + /usr/local/bin/update_kamailio_public_ip.sh | |
| + RETVAL=$? | |
| + [ $RETVAL = 0 ] && success |
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 | |
| CFG=/usr/local/etc/kamailio_public_ip.cfg | |
| TMP=/tmp/.kamailio_public_ip.cfg | |
| for i in 1 2 3 | |
| do | |
| IP=$(/usr/bin/curl -s ident.me) | |
| if [ ! "x$IP" = "x" ]; then | |
| break |
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/local/pkg/freeradius.inc.orig 2019-06-27 12:05:51.627738000 +0000 | |
| +++ /usr/local/pkg/freeradius.inc 2019-06-27 12:09:45.938947000 +0000 | |
| @@ -1895,6 +1895,10 @@ | |
| {$varmodulesldap2enableauthorize} | |
| } | |
| + update control { | |
| + Auth-Type := LDAP | |
| + } | |
| + |
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
| /****************************************************************************** | |
| This sample T-SQL script performs basic maintenance tasks on SUSDB | |
| 1. Identifies indexes that are fragmented and defragments them. For certain | |
| tables, a fill-factor is set in order to improve insert performance. | |
| Based on MSDN sample at http://msdn2.microsoft.com/en-us/library/ms188917.aspx | |
| and tailored for SUSDB requirements | |
| 2. Updates potentially out-of-date table statistics. | |
| 3. Fixed line 100 by jazzl0ver (from https://stackoverflow.com/questions/12674664/alter-index-failed-because-of-quoted-identifier-when-running-from-sp-msforeachta) | |
| ******************************************************************************/ | |
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 python | |
| # | |
| # Unsubscribe SNS topic from deleted SQS endpoints | |
| # One might want to run like this: | |
| # for i in $(aws sns list-topics --output text | grep s3vol | cut -f2); do ./del_sqs_endp_from_sns.py $i; done | |
| # | |
| # Why: at this moment (July 2019) AWS does not support automatic SQS endpoint unsubscribing when the correspondence queue is deleted | |
| # | |
| import boto |
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
| <LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification" Version="1"> | |
| <LayoutOptions StartTileGroupCellWidth="6" /> | |
| <DefaultLayoutOverride> | |
| <StartLayoutCollection> | |
| <defaultlayout:StartLayout GroupCellWidth="6"> | |
| <start:Group Name="Windows Server"> | |
| <start:DesktopApplicationTile Size="2x2" Column="4" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\Windows PowerShell ISE.lnk" /> | |
| <start:DesktopApplicationTile Size="2x2" Column="4" Row="2" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Control Panel.lnk" /> | |
| <start:DesktopApplicationTile Size="2x2" Column="0" Row="4" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsof |
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
| #-- there're four proxmox boxes (vm-box-1..vm-box-4) | |
| #-- all commands should be issued on one of the boxes | |
| for i in $(seq 1 4); do ssh vm-box-$i apt install dlm-controld gfs2-utils -y; done | |
| for i in $(seq 1 4); do ssh vm-box-$i 'echo DLM_CONTROLD_OPTS="--enable_fencing 0" >> /etc/default/dlm; systemctl restart dlm'; done | |
| #-- check if /dev/misc folder exists. if not, run: | |
| for i in $(seq 1 4); do ssh vm-box-$i "systemctl stop dlm; rmmod gfs2; rmmod dlm; sleep 3; systemctl restart udev; sleep 3; systemctl start dlm"; done | |
| #-- add iscsi storage to proxmox (check shared) |
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 | |
| # | |
| # Script takes pfSense configuration file (1st argument), strips out all freeradius users | |
| # and replaces them with the users from the CSV file (2nd argument): | |
| # ./freeradius_users_csv_to_xml.pl pfSense-config.xml users.csv > pfSense-config-new.xml | |
| # | |
| # After the config uploaded and pfSense rebooted, https://gist.github.com/jazzl0ver/b605b1b6fc1effa448fa55467797ac81 patch should be applied: | |
| # | |
| # cd /root; patch -p0 < freeradius.inc.patch | |
| # |
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
| @echo off | |
| rem -- put this script into the task scheduler and redirect output to a log file: | |
| rem -- c:\utils\ad_backup.bat > c:\utils\ad_backup.log 2>&1 | |
| rem -- path to remote storage | |
| set SHARE=\\filer-1\sysstates | |
| rem -- what to backup | |
| set PATH2BACKUP=c:\utils C:\Windows\System32\dns\backup |