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 os | |
import random | |
import subprocess | |
import json | |
def get_mp4_files(paths, depth=1): | |
mp4_files = [] | |
for path in paths: | |
if depth < 0: | |
return mp4_files |
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
# Get the current PATH | |
$currentPath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path | |
# Your MSBuild path | |
$msbuildPath = "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin" | |
# Create a new PATH | |
$newPath = $currentPath + ";" + $msbuildPath | |
# Set the new PATH | |
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath |
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
//FUNCTION | |
// This function attempts to create a new svg "text" element, chopping | |
// it up into "tspan" pieces, if the text is too long | |
static textToSvg(caption, x, y) { | |
//svg "text" element to hold smaller text lines | |
var svgTextHolder = document.createElementNS('http://www.w3.org/2000/svg', 'text'); | |
svgTextHolder.setAttributeNS(null, 'x', x); | |
svgTextHolder.setAttributeNS(null, 'y', y); | |
svgTextHolder.setAttributeNS(null, 'font-size', 10); |
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
reset the earbuds individually, not together, | |
then return them to the case, | |
take them out, let them sync together, leaving them 2 or 3 minutes, | |
once the left earbud has stopped flashing, | |
then turned on the phone BT and connected to the right earbud |
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
//gets events from EventDataList.xml | |
//for viewing in time legend | |
async function getEventDescription(eventName) { | |
//search for matching event name | |
var eventXmlList = window.$EventDataListXml.find('Event'); //get all event elements | |
var results = eventXmlList.filter( | |
function () { | |
var eventNameXml = $(this).children('Name').eq(0); | |
return eventNameXml.text() === eventName; | |
}); |
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
$InstallPath = 'C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy' | |
# Add InstallPath to the System Path if it does not exist | |
if ($env:PATH -notcontains $InstallPath) { | |
$path = ($env:PATH -split ";") | |
if (!($path -contains $InstallPath)) { | |
$path += $InstallPath | |
$env:PATH = ($path -join ";") | |
$env:PATH = $env:PATH -replace ';;', ';' | |
} |
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
1.Easy Readablilty | |
2.No Duplication | |
3.Performance Gain | |
Explantion: | |
When there is decision to be made between a comprimise | |
of Easy Readablity & No Duplication, make the decision in favor of Readability. | |
This will lead to code with easier maintainence down the road. |
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
Create shortcut with below target: | |
rundll32.exe powrprof.dll,SetSuspendState 0,1,0 |
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
Open regedit | |
1.Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows | |
2.Right click on Windows and select New>Key | |
3.Name the new key Personalization | |
4.Right click on Personalization and select New>DWORD (32-Bit) Value | |
5.Name it NoLockScreen | |
6.Double click NoLockScreen and edit the value to be 1 (Hexadecimal) and click OK. | |
7.Restart the computer, and the lock screen should be disabled when it resumes from sleep. |
NewerOlder