Skip to content

Instantly share code, notes, and snippets.

View JDSileo's full-sized avatar

Joseph Sileo JDSileo

View GitHub Profile
@JDSileo
JDSileo / AD-TeamsSync.ps1
Created October 9, 2020 19:05
This script will sync an AD Group with a Microsoft Team.
##This script will sync an AD Group with a Microsoft Team. (Tested on Windows Server 2019)
##This script should be run in a user context that has read access to a Windows Active Directory domain.
##To make it easier I have it run every 30 minutes starting about 5 minutes after an expected ADSync.
##This works with Microsoft Business Basic subscriptions. P1 licensing is not required.
##MSTeams Powershell Module: https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-overview
##AADSync: https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sync-whatis
$Disabled = Get-ADUser -Filter {Enabled -eq $false};#Get List of Disabled Users.
$Teams_Admin_User = "<Admin Username Here>";#Teams Administrator Username.
$Teams_Admin_Password = "<Admin Password Here>";#Teams Administrator Password.
<?php
//This script is designed to find the next business day for U.S. Banks relative to the current timestamp.
//The next Business Day function is recursive to call itself if the date being tested is not a regular banking day.
//Most U.S. banks consider the day after a federal holiday to also be banking holiday for the purposes of posting transactions.
//
//Author: Joseph Deane Sileo
//Email: [email protected]
//Date: 2020-01-14 15:00:00PM EST
@JDSileo
JDSileo / super_perm.php
Last active December 1, 2018 13:42
Super Permutation Generator
<?php
//This script is designed to find the smallest super permutation of any given integer.
//Each sufficently complex line of code is documented as to its purpose in the overall script.
//The given number represented by variable $z is incremented down by 1 so that the base_convert function can be used to easily find the permutation instead of checking against numbers that have invalid digits.
//(e.g. There is no point in checking string 22132136 to see if it is a super permutation of 3 as 6 is greater than 3)
//I conjecture that this script MUST result in the smallest possible super permutation for a given number as all combinations smaller than it are checked and falisified.
//
//This script was created after I watched a video on YouTube titled "Superpermutations". (https://www.youtube.com/watch?v=wJGE4aEWc28)
//