Skip to content

Instantly share code, notes, and snippets.

@disco0
disco0 / regexinfo.ps1
Created January 12, 2018 05:27 — forked from latkin/regexinfo.ps1
Regex matching helper
<#
Dumps capture group locations and names/numbers
Example:
> regexinfo 'Jenny: 555-867-5309' '(?<name>\w+):\s+(?<phone>(?:(?<area>\d{3})-)?(\d{3}-\d{4}))'
[Jenny]: [[555]-[867-5309]]
| || |
| || 1
| |area
| phone
<Configuration>
<ViewDefinitions>
<View>
<Name>MatchInfo</Name>
<ViewSelectedBy>
<TypeName>Microsoft.PowerShell.Commands.MatchInfo</TypeName>
</ViewSelectedBy>
<CustomControl>
<CustomEntries>
<CustomEntry>
@disco0
disco0 / V-GUI Steam.xml
Created August 1, 2018 05:32 — forked from nairdan2/V-GUI Steam.xml
V-GUI Steam UDL 2.1 Language
<NotepadPlus>
<UserLang name="V-GUI Steam" ext="layout styles res" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="2" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="yes" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00// 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@disco0
disco0 / README.md
Created September 27, 2018 22:41 — forked from SkyLeach/README.md
Userscript for extracting data from Audible.com

Somewhat tempermental userscript for extracting data from Audible.com

@disco0
disco0 / Custom.css
Created October 2, 2018 05:52 — forked from paulredmond/Custom.css
Espresso syntax theme for Google Chrome Inspector
/**********************************************/
/*
/* Espresso-inspired theme for Google Chrome Inspector
/*
/* By: Paul Redmond http://github.com/paulredmond
/*
/* Inspired by Darcy Clarke's post - http://darcyclarke.me/design/skin-your-chrome-inspector/
/* Darcy Clarke's "Darker Skin" theme - http://darcyclarke.me/dev/inspectorskin/Custom.css
/*
/**********************************************/
@disco0
disco0 / equalizer.lua
Created October 14, 2018 14:23 — forked from avih/equalizer.lua
Visual equalizer script for mpv
--[[
mpv 5-bands equalizer with visual feedback.
Copyright 2016 Avi Halachmi ( https://github.com/avih )
License: public domain
Default config:
- Enter/exit equilizer keys mode: ctrl+e
- Equalizer keys: 2/w control bass ... 6/y control treble, and middles in between
- Toggle equalizer without changing its values: ctrl+E (ctrl+shift+e)
// this function handles the form submit
function addVideoToPlaylist(e){
// 'Youtube url' is the question title from our form. If you change your question change this value
// youtube_parser() takes the url and strips the video_id
var id = youtube_parser(e.namedValues['Youtube url'][0]);
var desc = e.namedValues['Comment'][0]; // if you would like to add a note with playlist item add form field
addToPlaylist(id, desc);
}
// This function is taken from the YouTube API doc (Javascript example)
@disco0
disco0 / add_wsl_exclusions.ps1
Created February 23, 2019 05:06 — forked from ian-p-cooke/add_wsl_exclusions.ps1
powershell script to add WSL exclusions
$win_user = "ipc"
$linux_user = "ipc"
$package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc"
$base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs"
$dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin")
$dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") }
Add-MpPreference -ExclusionPath $base_path
Function Trace-Word
{
[Cmdletbinding()]
[Alias("Highlight")]
Param(
[Parameter(ValueFromPipeline=$true, Position=0)] [string[]] $content,
[Parameter(Position=1)]
[ValidateNotNull()]
[String[]] $words = $(throw "Provide word[s] to be highlighted!")
function new-PowershellWebGUI ($HTMLRaw,$Title,$Runspace) {
[xml]$xaml = @"
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Title="$Title" Height="500" Width="700">
<Grid>
<DockPanel>
<WebBrowser Name="WebBrowser" DockPanel.Dock="Top" Margin="30">
</WebBrowser>