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
import json | |
import boto3 | |
def lambda_handler(event, context): | |
msg = None | |
try: | |
data = json.loads(event['body'].lower()) | |
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
import time | |
import calendar | |
def dattim_to_epoch(dattim, fmt='%Y%m%d%H%M'): | |
return int(calendar.timegm(time.strptime(str(dattim), fmt))) |
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
import datetime | |
def epoch_to_dattim(epoch_time, fmt='%Y%m%d%H%M%S'): | |
return int(datetime.datetime.utcfromtimestamp(int(epoch_time)).strftime(fmt)) |
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/zsh | |
# Check if directory argument is provided | |
if [ -z "$1" ]; then | |
echo "Usage: $0 /path/to/directory" | |
exit 1 | |
fi | |
# Set the directory | |
directory="$1" |
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
<?php | |
// Initialize global parameters. | |
$SQL_USERNAME = ""; | |
$SQL_PASSWORD = ""; | |
$SQL_DATABASE = ""; | |
$conn = NULL; | |
// Function. Display an JSON message. | |
function jsonMessage ($msg='Generic error.', $success=FALSE) { |
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
<?php | |
$SQL_DATABASE = ""; | |
$SQL_USERNAME = ""; | |
$SQL_PASSWORD = ""; | |
// Function. Display an JSON message. | |
function jsonMessage ($MessageDetails='Generic error.', $IsSuccess=FALSE) { | |
// Return message. |
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
<?php | |
/* | |
/ BYU Y-TIME TRIGGER FOR IFTTT (UNOFFICIAL) | |
/ Author: Charles Christensen | |
/ Edited: April 3, 2019 | |
/ | |
/ Required Dependencies: | |
/ - IFTTT | |
/ - PHP Webserver |
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
Start-Sleep -Seconds 60 # allow windows to spin-up | |
Import-Module -name AWSPowerShell | |
# Define your parameters | |
$hostedZoneId = "ZZZZZ" # The ID of your hosted zone in Route 53. | |
$recordName = "subdomain.url.co" # The A record you want to update (e.g., "subdomain.example.com.") | |
$awsRegion = "us-west-2" # The AWS region (if using Route 53 in a specific region) | |
# Fetch the public IPv4 address from the metadata service. |
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
# Purpose: Create a CSV report of machines connected to SCCM. | |
# Set parameters. | |
Write-Host "Setting parameters." | |
$ServerAddress = "[YOUR_SERVER_ADDRESS]" | |
$ServerNamespace = "root\SMS\Site_[YOUR_SITE_ID]" | |
$BoxUsername = "[BOX_FTP_USERNAME]" | |
$BoxPassword = "[BOX_FTP_PASSWORD]" | |
$BoxSaveDirectory = "ftp://ftp.box.com/[BOX_DIRECTORY_URL_ENCODED]" |
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
# Purpose: Create a CSV report of applications currently deployed in SCCM. | |
# Set parameters. | |
Write-Host "Setting parameters." | |
$FolderNames = @("Common","Purchased") | |
$LengthOfRecent = 7 | |
$ServerAddress = "[YOUR_SERVER_ADDRESS]" | |
$ServerNamespace = "root\SMS\Site_[YOUR_SITE_ID]" | |
$BoxUsername = "[BOX_FTP_USERNAME]" | |
$BoxPassword = "[BOX_FTP_PASSWORD]" |
NewerOlder