Skip to content

Instantly share code, notes, and snippets.

@exlted
exlted / music.css
Created May 29, 2020 16:03
Music Overlay
* {
font-family: sans-serif;
font-size: larger;
margin: 0px;
padding: 0px;
}
#NowPlaying {
position:absolute;
bottom: 0px;
# Taken from here: https://gallery.technet.microsoft.com/scriptcenter/A-PowerShell-Assert-5e8670e2
# Credit to imfrancisd
function Assert-True
{
<#
.Synopsis
Assert that a value is the Boolean value $true.
.Description
This function throws an error if any of the following conditions are met:
*the value being asserted is $null
@exlted
exlted / Simple-Settings.psm1
Last active October 10, 2019 15:20
Simple-Settings
class SettingsObj
{
[String] $location
$settings
SettingsObj ([String]$location)
{
$this.location = $location
$this.updateSettings();
}
@exlted
exlted / Jump-Location.psm1
Last active October 10, 2019 14:37
Jump-Location
using module Simple-Settings
$storageLoc = Join-Path $PSScriptRoot "jumpConf.xml"
$global:Storage = New-Object SettingsObj -ArgumentList $storageLoc
New-Alias Jump-Location Move-Location
New-Alias Move-Shortcut Move-Location
New-Alias Jump-Shortcut Move-Location
function Move-Location {
$location = Get-Jump @args
cd $location
@exlted
exlted / jquery.flot.valuelabels.js
Last active February 8, 2019 19:17
Initial work on extending the Flot Value Labels plugin to allow for hover and click events to fire on the tooltips.
/**
* Value Labels Plugin for flot.
* https://github.com/winne27/flot-valuelabels
* https://github.com/winne27/flot-valuelabels/wiki
*
* Implemented some new options (useDecimalComma, showMinValue, showMaxValue)
* changed some default values: align now defaults to center, hideSame now defaults to false
* by Werner Schäffer, October 2014
*
* Using canvas.fillText instead of divs, which is better for printing - by Leonardo Eloy, March 2010.
@exlted
exlted / Bugle-Core.psm1
Last active January 9, 2019 21:32
Bugle (Powershell Task Runner)
New-Alias Bugle Invoke-Local
function Invoke-Local(){
param(
[Parameter(Position=0,mandatory=$true)][string] $task,
[Parameter(Position=1)][string[]] $parms,
[string] $file = ".\build.ps1"
)
if($task[0] -eq "_"){
Write-Error "Scripts starting with _ are considered private"