Skip to content

Instantly share code, notes, and snippets.

@yon2004
yon2004 / is not compatible with Po1.txt
Created March 1, 2022 22:26
A issue with cisco port-channel and storm-control broadcast level
*Jan 2 05:35:25.421: %EC-5-CANNOT_BUNDLE2: Gi1/0/24 is not compatible with Po1 and will be suspended (Broadcast suppression: Level of Gi1/0/24 is not configured. Level of Po1 is 60.00%, 60.00%.)
*Jan 2 05:35:31.262: %EC-5-CANNOT_BUNDLE2: Gi1/0/23 is not compatible with Po1 and will be suspended (Broadcast suppression: Level of Gi1/0/23 is not configured. Level of Po1 is 60.00%, 60.00%.)
source template template_with_stormcontrol
Check to see if you have storm-control broadcast level set on any of your templates as this will cause issues on switch reboot.
sudo cp -r basicstation/build-rpi-std/* /opt/basicstation/
sudo nano /etc/systemd/system/basicstation.service
sudo systemctl daemon-reload
sudo systemctl enable basicstation.service
sudo systemctl start basicstation.service
$Students = Get-ADGroupMember -Identity "Students" |Get-ADUser -Properties *
$Directories = @(
"Science",
"Maths",
"English"
)
ForEach ($Student in $Students){
@yon2004
yon2004 / AD-BASE64-SID.ps1
Last active September 5, 2023 06:27
Convert AD BASE64 SID to SDDL format and back.
#Convert from Base64 to SID
[byte[]]$sid = [System.Convert]::FromBase64String("AQUAAAAAAAUVAAAAuwkCIyAUg1vk+E/VWQQAAA==")
$si = New-Object Security.Principal.SecurityIdentifier($sid,0)
$si.ToString()
#Convert from SID to Base64 (Needed for squid)
$sidconvert = New-Object Security.Principal.SecurityIdentifier("S-1-5-21-587336123-1535317024-3578788068-1112")
$sid_out = New-Object 'byte[]' $sidconvert.BinaryLength
$sidconvert.GetBinaryForm($sid_out,0)
@yon2004
yon2004 / WindowsUpdateFix.ps1
Created July 27, 2018 02:37
A script that can be run to fix the windows 10 bug that causes corruption of the software distribution folder. 0x80242006
$log_path = "$($env:TEMP)\WindowsUpdateFix.txt"
$folder_name = "$($env:windir)\SoftwareDistribution"
$folder_name_new = "$($env:windir)\SoftwareDistribution.27072018"
Start-Transcript -Path $log_path -Append
Write-Output "log_path: $($log_path)"
Write-Output "folder_name: $($folder_name)"
Write-Output "folder_name_new: $($folder_name_new)"
#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
#Fizz buzz is a group word game for children to teach them about division.
#Players take turns to count incrementally, replacing any number divisible by three with the word "fizz"
#and any number divisible by five with the word "buzz".
def FizzBuzz(fizz_num):
out = []
if fizz_num % 3 == 0:
out.append("Fizz")
if fizz_num % 5 == 0:
out.append("Buzz")
' ScriptCryptor Project Options Begin
' HasVersionInfo: No
' Companyname:
' Productname:
' Filedescription:
' Copyrights:
' Trademarks:
' Originalname:
' Comments:
' Productversion: 0. 0. 0. 0
<#
************************************************************************************************************
Purpose: Remove built in apps specified in list
Pre-Reqs: Windows 8.1
************************************************************************************************************
#>
#---------------------------------------------------------------------------------------------------------------
# Main Routine
#---------------------------------------------------------------------------------------------------------------
### Keybase proof
I hereby claim:
* I am yon2004 on github.
* I am jonward (https://keybase.io/jonward) on keybase.
* I have a public key whose fingerprint is 2251 B05C 09EA CCF4 B046 1FBE 678E CA0E 6FFB EFB0
To claim this, I am signing this object: