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 bash | |
# FusionAuth CLI API Tool | |
# Requirements: httpie and jq | |
# mReschke 2021-05-17 | |
# Create an environment config in ~/.config/fusionauth/fa-api-prod like so | |
# auth_url='https://auth.yourfusion.com' | |
# api_key='master-api-key' | |
# user="[email protected]" |
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
# mReschke Standardized .editor config | |
# See https://gist.github.com/mreschke/7d9c4ecc8b4f67a8b260593e9ac1e07a | |
# Top-most EditorConfig file | |
root = true | |
# Global settings | |
[*] | |
charset = utf-8 | |
indent_size = 4 |
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 | |
# .secrets (dot secrets) by mReschke 2017-10-02 | |
# Download to /usr/local/bin and chmod a+x | |
# Then run .secrets to setup your first vault! | |
# Latest gist: https://gist.github.com/mreschke/c0d60e6c81a787c64e61b8ec79c62143 | |
option="$1" | |
vault="$2" | |
path=~/.secrets |
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 | |
# Convert tabs to spaces in code files | |
# and convert all PHP files (that begin with <? or <?php, so not laravel blade files) to PSR-2 | |
# Requires https://github.com/FriendsOfPHP/PHP-CS-Fixer in $path | |
# mReschke 2016-09-28 | |
dir=$(pwd) | |
# Replace tabs with 4 spaces in particular files |
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 php | |
<?php | |
# Basic live zabbix stats specifically for Dynatron servers | |
# This is also a github gist, so be sure to keep that updated | |
# https://gist.github.com/mreschke/d86e073efc2a8757b30e413850f44439 | |
# mReschke 2016-08-08 | |
while (1) { | |
system('clear'); |
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 is run from /etc/systemd/system/x11vnc.service | |
# This is run at KDM, not when user logs in, therefore the systemd | |
# unit is running as root user | |
# mReschke 2016-04-07 | |
# Systemd unit file: | |
# --------------------------------------------------- | |
#[Unit] |
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 python | |
# Clean up old files around the server, called weekly Sunday 8am | |
# mReschke 2012-05-01 | |
import os | |
import sys | |
import subprocess | |
import traceback | |
import datetime |
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
Option Explicit | |
'Process Manager | |
'Check a process, restart it and send email alert, or kill process depending on time window | |
'If process is NOT running between start/endHour then restart it and send an email if sendEmail = true | |
'If process is running outside of start/endHour then kill it. | |
'Original script created by NetRes | |
'Modified by mReschke 2008-04-28 (converted to functions, actions change by time, email enhancements, globals, generic process killer) | |
'Globals |
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
Option Explicit | |
'mReschke fo zabbix 2009-03-12 | |
'Will start/stop a process | |
'Will only start 1 process, will not start if already started, no multiples | |
Dim ArgObj, strComputer, objWMIService, colProcesses, Process | |
Dim processPath, processName, processAction | |
Set ArgObj = WScript.Arguments |
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
' A windows vbscript to delete old files. Simply make a .bat file and thow it in Windows scheduled tasks | |
' Example, same file in C:\batch\DeleteOldFiles.vbs and make C:\batch\CleanupThisServer.bat: | |
' | |
' cd C:\batch | |
' cscript DeleteOldFiles.vbs "D:\SMTPExpress\EasyMail SMTP Express\logfiles" 90 | |
' cscript DeleteOldFiles.vbs "D:\DynaMailPDF\" 720 txt 2 (this one uses max depth =2) | |
'-------------------------------------------------------------------------------------- | |
' Objective: To delete old files from a given folder and all subfolders below | |
' Created by: MAK | |
' Created Date: June 21, 2005 |
NewerOlder