Skip to content

Instantly share code, notes, and snippets.

View felickz's full-sized avatar
:octocat:
ALL YOUR REBASE ARE BELONG TO US.

Chad Bentz felickz

:octocat:
ALL YOUR REBASE ARE BELONG TO US.
View GitHub Profile
$symbols = '!@#$%^&*'.ToCharArray()
$characterList = 'a'..'z' + 'A'..'Z' + '0'..'9' + $symbols
function GeneratePassword {
param(
[Parameter(Mandatory = $false)]
[ValidateRange(12, 256)]
[int]
$length = 14
)
@felickz
felickz / fix-wsl2-dns-resolution
Last active October 5, 2020 15:43 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
1. Create a file: /etc/wsl.conf.
2. Put the following lines in the file in order to ensure the your DNS changes do not get blown away
[network]
generateResolvConf = false
3. In a cmd window, run wsl --shutdown
4. Restart WSL2
5. Create a file: /etc/resolv.conf. If it exists, replace existing one with this new file: `rm /etc/resolv.conf`
6. Put the following line in the file
@felickz
felickz / JsonPointerPropertyExtractionRule.cs
Last active October 12, 2016 12:18 — forked from LockTar/JsonPropertyExtractionRule.cs
An RFC 6901 JSON Pointer extraction rule for Visual Studio webtest that extracts a value from a JSON response
using Microsoft.VisualStudio.TestTools.WebTesting;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.ComponentModel;
using Tavis;
namespace Extensions.ExtractionRules
{
/// <summary>