Skip to content

Instantly share code, notes, and snippets.

View vienleidl's full-sized avatar

Vien vienleidl

  • 02:21 (UTC +07:00)
View GitHub Profile
@dacarroll
dacarroll / Password Change Notification O365.ps1
Last active August 2, 2023 18:08
Script to Automate Email Reminders when Users Passwords due to Expire using O365 Shared Mailbox
#################################################################################################################
#
# Original Robert Pearman v1.4 Passowrd Change Notification
# - Adapted to support O365 SendAS Shared Mailbox
# Script to Automate Email Reminders when Users Passwords due to Expire using O365 Shared Mailbox.
#
# Requires:
# Windows PowerShell Module for Active Directory
# Azure AD Application registration with MS Graph Application Mail.Send permission
#
@schakko
schakko / nginx.conf
Last active January 17, 2024 08:06
Adjusted nginx.conf to make Laravel 9 and Laravel 10 apps with PHP 8.0, 8.1 and 8.2 features runnable on Azure App Service
server {
# adjusted nginx.conf to make Laravel 9 and Laravel 10 apps with PHP 8.0, 8.1 and 8.2 features runnable on Azure App Service
# @see https://laravel.com/docs/10.x/deployment
# @see https://laravel.com/docs/9.x/deployment
listen 8080;
listen [::]:8080;
root /home/site/wwwroot/public;
index index.php;
server_name example.com www.example.com;
@cloudcap10
cloudcap10 / 0-Readme.md
Last active November 29, 2022 17:00 — forked from meoso/Example.com-Password-Expiration-Notifications.ps1
PowerShell Active Directory Password Expiration Email Notification

Password-Expiration-Notifications.ps1 is a powerShell script designed to be run on a schedule to automatically email Active Directory users of soon-to-expire and recently-expired passwords.

This version is a highly modified fork of the original v1.4 by Robert Pearman from https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27. Pearman's 2.x version was completely re-written.

New in this version:

  • Added Office 365 SMTP - 2-Password-Expiration-Notifications-office365.ps1
  • No SMTP Authentication - 1-Password-Expiration-Notifications.ps1
  • A SearchBase is required.
  • When logging, the CSV will always be overwritten.
  • Accounts with recently-expired passwords can be notified by specifying a "negativedays" value.
@meoso
meoso / Example.com-Password-Expiration-Notifications.ps1
Last active September 17, 2024 21:25
PowerShell Active Directory Password Expiration Email Notification
#################################################################################################################
#
# Password-Expiration-Notifications v20220823
# Highly Modified fork. https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64
#
# Originally from v1.4 @ https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27
# https://windowspoweressentials.com/2017/02/21/powershell-password-reminder-script-updated/
# https://github.com/titlerequired/public
# Robert Pearman (WSSMB MVP)
# TitleRequired.com
@lukeplausin
lukeplausin / bash_aws_jq_cheatsheet.sh
Last active August 29, 2024 20:27
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account