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/env python3 | |
| """ | |
| CPU Usage History Grapher for a Selected Process | |
| Features: | |
| - Select process by PID or exact name (case-insensitive). | |
| - Progress indicator with elapsed time, remaining time (ETA), and % complete. | |
| - Warm-up to avoid inflated first sample. | |
| - Optional normalization to 0–100% of total system CPU (across all logical CPUs). | |
| - Optional EMA (Exponential Moving Average) smoothing to tame spikes (applies to the plotted/summary values). |
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
| <html> | |
| <!-- | |
| A Simple example using sliders to control the frequencies of two oscillators | |
| --> | |
| <body> | |
| <div> | |
| <label for="frequency1">Frequency 1: </label> | |
| <input type="range" id="frequency1" min="0" max="4000" value="600"> | |
| <span id="frequency1Value">600</span> Hz | |
| </div> |
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
| PSEnsure | |
| ( | |
| Key: PowerShell MaxEnvelopeSizekb, | |
| Value: $PowerShell_MaxEnvelopeSizekb, | |
| Collect: "(Get-Item WSMan:\localhost\MaxEnvelopeSizekb).Value", | |
| Configure: "Set-Item WSMan:\localhost\MaxEnvelopeSizekb -Value $PowerShell_MaxEnvelopeSizekb" | |
| ); |
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
| if(!(Get-Command choco -erroraction SilentlyContinue)) { | |
| Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
| } | |
| choco install webpicmd -y | |
| $webpicmd = 'webpicmd' | |
| if(!(Get-Command $webpicmd -erroraction SilentlyContinue )) { | |
| $webpicmd = 'C:\Program Files\Microsoft\Web Platform Installer\WebpiCmd.exe' |
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
| $c = @" | |
| using System; | |
| public class SequentialGuid { | |
| Guid _CurrentGuid; | |
| public Guid CurrentGuid { | |
| get { | |
| return _CurrentGuid; | |
| } | |
| } |
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
| $c = @" | |
| using System; | |
| using System.Runtime.InteropServices; | |
| public static class SeqGuid { | |
| private class NativeMethods | |
| { | |
| [DllImport("rpcrt4.dll", SetLastError=true)] | |
| public static extern int UuidCreateSequential(out Guid guid); | |
| } |
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
| <html> | |
| <header> | |
| <script lang="javascript" > | |
| var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); | |
| var sineTerms = new Float32Array([0, 0, 1, 0, 1]); | |
| var cosineTerms = new Float32Array(sineTerms.length); | |
| var customWaveform = audioCtx.createPeriodicWave(cosineTerms, sineTerms); |
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 | |
| #Docker commands taken from: https://inedo.com/support/kb/1100/getting-started-with-proget-for-linux#limitations | |
| brew cask install docker | |
| #Now, go and start start docker from finder | |
| mkdir -pv /private/var/proget/db | |
| mkdir -pv /private/var/proget/packages |
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
| <CodeSnippet Format="1.1.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
| <Header> | |
| <Title>prop</Title> | |
| <Author>Mark R. Johnson</Author> | |
| <Shortcut>prop</Shortcut> | |
| <Description>Code snippet for a property</Description> | |
| <SnippetTypes> | |
| <SnippetType>Expansion</SnippetType> | |
| </SnippetTypes> | |
| </Header> |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| using Microsoft.Win32.SafeHandles; | |
| public static class CredentialManager | |
| { | |
| public static Credential ReadCredential(string applicationName) |
NewerOlder