This file contains 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 python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Clear blocked IP addresses in switchvox. | |
Requires pyswitchvox | |
Feel free to adjust logger if desired. | |
""" | |
from pyswitchvox.client import Client |
This file contains 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
cat requirements.txt | perl -pe 's/([<=>]+)/:$1/' | xargs -t -n 1 -I {} poetry add '{}' |
This file contains 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
########## | |
# Win10 Initial Setup Script | |
# Author: Disassembler <disassembler@dasm.cz> | |
# Version: 1.4, 2016-01-16 | |
# | |
# Modifications and video from CraftComputing : https://www.youtube.com/watch?v=PdKMiFKGQuc&ab_channel=CraftComputing | |
# | |
########## | |
# Ask for elevated permissions if required |
This file contains 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 python3 | |
""" | |
Simple function to create random generated password types. | |
See examples at the end of gist. | |
""" | |
import os, string, random | |
def genpass(digits=False, length=13, special_char_set='!@#$%', | |
repeat_chars=True, | |
require_special_char=True, |
This file contains 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 | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
set -o allexport | |
source .env | |
set +o allexport |
This file contains 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 | |
# This script is intended to automate the addition of let-encrypt certificates for Kerio Connect mail server | |
# It uses the powerful acme.sh script to generate the SSL Certificate, and apply it to the Kerio Connect installation | |
# Currently this works with Debian, because thats what I use, the process is simiular on other Linux OS's | |
# This script is provided as-is, but if you have improvements I am happy to incorporate them. | |
MAIL_DOMAIN_NAME=mail.example.com | |
ACME=/root/.acme.sh/acme.sh |
This file contains 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/sh | |
#; | |
#; Replaces /usr/sbin/xe-linux-distribution | |
#; | |
# Copyright (c) 2015, Citrix Systems | |
# All rights reserved. | |
# Redistribution and use in source and binary forms, with or without modification, | |
# are permitted provided that the following conditions are met: |
This file contains 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 | |
# | |
# Automated cleanup of slack messages. | |
# Must have slack-cleaner already installed. | |
# Simply replace your SLACK_TOKEN string with your legacy webapi token. | |
# Set the number of days you wish to retain, and add this to a cron job to run at | |
# the desired interval. | |
SLACK_TOKEN=My-Slack-Legacy-WebToken |
This file contains 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 | |
# | |
# Description: | |
# Demo of how to download EdgeOS configuration and check if a change exists. | |
# If a change exists send a notification to a Zabbix server. | |
# | |
# **************************************************************************************** | |
# This script is provided as a demo to show how to backup configurations automatically | |
# You should not consider this a production script. If you are interested in a production | |
# script please contact me @ support[at]voice1[dot]me or feel free to modify this to your |
This file contains 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
from peewee import * | |
database = MySQLDatabase('asterisk', **{'charset': 'utf8', 'use_unicode': True}) | |
class UnknownField(object): | |
def __init__(self, *_, **__): pass | |
class BaseModel(Model): | |
class Meta: | |
database = database |
NewerOlder