This file contains hidden or 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/powershell | |
<# | |
.SYNOPSIS | |
. | |
.DESCRIPTION | |
. | |
.PARAMETER FullInventoryCSV | |
The path to the fully inventory CSV output from GAM.py print cros allfields. CSV must be comma-separated. | |
.PARAMETER LocalInventoryCSV | |
The path to the local school inventory CSV as prepared by the tech. |
This file contains hidden or 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 | |
# Based on script by William Lam - http://engineering.ucsb.edu/~duonglt/vmware/ | |
# Found at http://askubuntu.com/questions/764620/how-do-you-hotplug-enable-new-cpu-and-ram-in-a-virtual-machine | |
# Bring CPUs online | |
for CPU in $(ls /sys/devices/system/cpu/ |grep -E '(cpu[0-9])') | |
do | |
CPU_DIR="/sys/devices/system/cpu/${CPU}" | |
echo "Found cpu: \"${CPU_DIR}\" ..." | |
CPU_STATE_FILE="${CPU_DIR}/online" |
This file contains hidden or 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 | |
#add VMware package keys | |
#wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub -O - | apt-key add - | |
#wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub -O - | apt-key add - | |
#grab Ubuntu Codename | |
codename="$(lsb_release -c | awk {'print $2}')" | |
#add VMware repository to install open-vm-tools-deploypkg |
This file contains hidden or 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
@-moz-document url-prefix("https://www.twitch.tv/directory/following") { | |
h1 { | |
animation-name: example; | |
animation-delay: 3s; | |
animation-duration: 3s; | |
animation-iteration-count: 1; | |
animation-fill-mode: forwards; | |
} | |
@keyframes example { |
This file contains hidden or 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 | |
# create subvolumes for shares on unraid to allow btrfs snapshots | |
# reference https://forums.unraid.net/topic/73439-btrfs-snapshots/ | |
disknum="3" | |
sharename="atlantic" | |
newsubvolpath="/mnt/disk$disknum/$sharename" | |
# function to check if path is subvol | |
# ref: https://stackoverflow.com/questions/25908149/how-to-test-if-location-is-a-btrfs-subvolume | |
is_btrfs_subvolume() { |
This file contains hidden or 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
# Source: https://activedirectorypro.com/how-to-get-ad-users-password-expiration-date/ | |
$cred = Get-Credential | |
Get-ADUser -server domaincontroller.domain -credential $cred -filter {Description -like "SRI*" -and Enabled -eq $True -and PasswordNeverExpires -eq $False} -Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" | | |
Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}} |
This file contains hidden or 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
var g_Backup_FileName="avr2012_backup.dat";var g_RecoveryStatus=false;function onControlMain(){g_Zone=0;changeDisplay();onBtnReload();} | |
function onControlZone2(){g_Zone=1;changeDisplay();onBtnReload();} | |
function onControlZone3(){g_Zone=2;changeDisplay();onBtnReload();} | |
function onControlZone4(){g_Zone=3;changeDisplay();onBtnReload();} | |
function onBtnPartyMode(){g_Info.m_partyMode=g_Info.m_partyMode?0:1;ajxSetPartyMode(g_Info.m_partyMode);} | |
function onBtnVolumeMute(zone,l_OnOff){ajxSetMute(zone,l_OnOff);} | |
function onBtnAllOn(){allpwronoff(1);ajxSetAllPower(1);} | |
function onBtnAllOff(){allpwronoff(0);ajxSetAllPower(0);} | |
function onZonePowerOnOff(zone,l_OnOff){g_Info.m_onZonePowerOnOff(zone,l_OnOff);ajxSetZonePower(zone,l_OnOff);} | |
function onSleep(time,zone){ajxSetSleep(zone,time);} |
This file contains hidden or 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
# Script to parse cisco IOS running-config.txt to csv file | |
# Work in progress | |
# Depends on cisco-config-parser (https://github.com/arezazadeh/cisco_config_parser) | |
# install with pip install --user cisco-config-parser | |
# only tested on Python 3.11 on Windows 10 | |
# issues so far: | |
# - does not handle "add" lines for additional allowed vlans - ie two lines of allowed vlans. I believe this is an upstream issue in the cisco_config_parser library | |
# | |
# this script adds a column header "id" at the end of the line. | |
# the id field can be used to map the imported data to existing interfaces (for example created by device templates) |
This file contains hidden or 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
/** | |
* Processes emails in a given label in Gmail. | |
* Can mark emails as read and/or archive them based on the specified action. | |
* Only processes emails older than the specified number of days. | |
* Can log the subject of each email it processes if verbose mode is enabled. | |
* | |
* @param {string} labelName - The name of the label to process emails in. | |
* @param {number} days - The number of days old an email must be to be processed. | |
* @param {number} action - The action to perform on each email (0 = none, 1 = mark as read, 2 = archive, 3 = mark as read and archive). | |
* @param {boolean} verboseMode - Whether or not to log the subject of each email processed. |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Continuously pings a given IP or hostname, making a beep for every ping reply and displaying a character for every reply or timeout. | |
.DESCRIPTION | |
This script continuously pings a given IP or hostname. For every ping reply, it makes a beep sound | |
(unless the -NoBeep switch is used) and displays a character. For every request timed out, it also | |
displays a character. The characters used depend on the version of PowerShell being used and whether | |
the -NoUnicode switch is used: if using PowerShell 6 or newer and -NoUnicode is not used, a green | |
circle character is displayed for ping replies and a red circle character for timeouts; otherwise, |
OlderNewer