Skip to content

Instantly share code, notes, and snippets.

View Nora-Ballard's full-sized avatar

Nora Ballard Nora-Ballard

View GitHub Profile
@Nora-Ballard
Nora-Ballard / palenight.js
Last active August 31, 2021 13:36 — forked from aesophor/palenight.js
Material Palenight Color Scheme for Blink Shell
// Material Palenight Color Scheme for Blink Shell
// by Greg Gamel (https://github.com/ggamel) (https://greg.is)
black = '#000000';
red = '#ff5370'; // red
green = '#c3e88d'; // green
yellow = '#ffcb6b'; // yellow
blue = '#82aaff'; // blue
magenta = '#c792ea'; // pink
cyan = '#89ddff'; // cyan
set -g mouse on
new-session -n $HOST

Keybase proof

I hereby claim:

  • I am nora-ballard on github.
  • I am noraballard (https://keybase.io/noraballard) on keybase.
  • I have a public key ASCTX0ZApmSzHBJZgpeA2v783DweuZaXBaSRWQUlBIVBuQo

To claim this, I am signing this object:

[cmdletbinding()]
param(
[Parameter(Mandatory)]
[Alias('ComputerName')]
[string[]]$InputObject,
[Parameter()]
[int16]$Port = 16992,
[Parameter(Mandatory)]

List disks (OSX)

diskutil list

Single Drive

sudo dd if=~/test.img of=/dev/rdisk2 bs=1m
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
$Script = "$here\$sut"
Describe "Nov2015ScriptGames" {
Context "When the string is ',' deliminated" {
$TestString = 'COMPUTER1,COMPUTER2,, COMPUTER3 , COMPUTER 4, COMPUTER5'
$ActualOutput = & $Script -VMNameStr $TestString
@Nora-Ballard
Nora-Ballard / Enable-WindowsOSUpgrade.ps1
Created October 17, 2015 22:11
Enable Windows 10 Upgrade, to get past the 'Wait for notification' screen
function Enable-WindowsOSUpgrade {
[CmdletBinding(
SupportsShouldProcess = $true
)]
param(
)
$Properties = @{
Path = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade'
Name = 'AllowOSUpgrade'
}
@Nora-Ballard
Nora-Ballard / FlexLM.psm1
Last active May 5, 2019 12:31
Identifies FlexLM Services, and can parse FlexLM logs to give usage information.
function Get-FlexLMUsage {
param(
[Parameter(Mandatory=$True)]
[string]$LogFile
)
$Log = Get-Content $LogFile -ErrorAction Stop
$Log | ForEach-Object {
if ($_ -match '.* TIMESTAMP (.*)') {
$Date = $matches[1]
@Nora-Ballard
Nora-Ballard / Select-OnChange.ps1
Created July 27, 2014 14:04
Will only pass down the pipeline if the object, or object property has changed from the previous value. Useful for monitoring the status of a system.
function Select-OnChange {
param(
[Parameter(Mandatory, ValueFromPipeline)]
$InputObject,
[Parameter()]
$PropertyName
)
PROCESS {
@Nora-Ballard
Nora-Ballard / Get-HPEnclosure.ps1
Created July 27, 2014 13:58
Reads HP Blade Enclosure XML (/xmldata?item=all) inventory page and formats in a PS friendly object. Does not require authentication to the chassis, so good for inventory in a new environment or quick status check.
function Get-HPEnclosure {
param(
[Parameter(Mandatory,ValueFromPipeline)]
[string]$ComputerName
)
$URL = 'http://{0}/xmldata?item=All' -f $ComputerName
$Result = [xml](Invoke-RestMethod -Uri $URL -Method Get)
$Enclosure = [pscustomobject]@{
'Name' = $Result.RIMP.INFRA2.ENCL