Skip to content

Instantly share code, notes, and snippets.

Stephen Owen 1RedOne

Block or report user

Report or block 1RedOne

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
1RedOne / Fix-CmdAutoComplete.ps1
Created Sep 14, 2019
Fix Tab Autocomplete for Cmd
View Fix-CmdAutoComplete.ps1
#In the new update to Windows 10, the tab autocomplete character was changed to CTRL+D or CTRL+F
#Run PowerShell in an elevated mode to change it back to 'Tab'
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Command Processor\' -Name PathCompletionChar -Value 9
1RedOne /
Last active Aug 30, 2019
Kindle Feature Suggestions

Kindle Suggestions

We bought a pair of Kindles Fire HD 8 tablets for the kids to use as a learning device. We were particularly motivated by Amazon Rapids, which my daughter loves and really has helped her reading ability. (We ever going to get new books? No new Rapids books since April of 2018!)

However my ability to control their experience wihtin the Kindle's primary usage environment, FreeTime, is way too limited for what I want. Here is how I'd like to see FreeTime ammended.

Give me Categorical Control Options

Today, there is simply way too much available in FreeTime. There are games, Movies, Videos, and way too much.

1RedOne / Foodtrucks.ps1
Last active Mar 3, 2019
Parsing out foodtruck times with PowerShell and REST
View Foodtrucks.ps1
$FoodTruckEvents = Invoke-RestMethod'
#this endpoint gives us a JSON response with multiple events, so we parse out each event
ForEach ($event in ${
#each event seems to be one day, so we resolve the .start_time and make it human readable
$date = Get-Date $event.start_time | Select-Object -ExpandProperty DateTime
#each event could have more than one truck, so we step through them
ForEach ($booking in $event.bookings){
1RedOne /
Last active Jan 17, 2019
Backup of post from reddit


Sure, but if you want to be objective about it you can't deny that one side is more tribal then the other.

1RedOne /
Last active Apr 29, 2019
Extracting content from an API from a site

Extracting Content from a site's unpublished API

Imagine that youve found a site that has a perfect list of some info you need, but the site owner's don't have it in a format you can easily use! This happens a lot, but fortunatley for us, if the data can be retrieved and displayed in a web browser, we can normally request that same data directly through a web call instead!

The problem is that the API endpoints we need to hit may not always be published publically.

For instance, this webpage has a lot of good info on beer, but no great way to export it.

1RedOne / Resolve-UniqueKBRecords.ps1
Created Nov 7, 2018
Search for matching records in a big csv using the .Where Method for speed
View Resolve-UniqueKBRecords.ps1
$csv = ConvertFrom-CSV "ComputerName,KBNeeded
$uniquePCs = $csv | Group-Object -Property ComputerName | Select -ExpandProperty Name
1RedOne / Join-VideoDirectory.ps1
Created Oct 29, 2018
Join Video Files with FFMPEG and PowerShell
View Join-VideoDirectory.ps1
Function Join-VideoDirectory {
$fileArray = New-Object System.Collections.ArrayList
$items = Get-childitem *.mkv,*.vob,*.mp4,*.ts
$itemCount = $items.Count
$i = 0
$cmdScript = ""
ForEach ($item in $items){
$cmdScript += "ffmpeg -i `"$($item.Name)`" -f mpegts -c copy file-0$i.mpeg.ts`n"
1RedOne / Lottery.Md
Last active Oct 19, 2018
Why you don't want to win the lottery
View Lottery.Md
1RedOne / DataGridsAreFun.ps1
Created Sep 20, 2018
WPF Example of using and populating a DataGrid with objects in PowerShell
View DataGridsAreFun.ps1
#Sample for this question on SO
$inputXML = @"
<Window x:Class="WpfApp2.MainWindow"
Title="MainWindow" Height="450" Width="800">
1RedOne /
Last active Aug 16, 2018
Parsing Malformed HTML via SQL

First off the source HTML has a lot of issues, as we can see here:

'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<STYLE type=text/css> P, UL, OL, DL, DIR, MENU, PRE { margin: 0 auto;}</STYLE>
<META name=GENERATOR content="MSHTML 11.00.10586.35"></HEAD>

<BODY leftMargin=1 topMargin=1 rightMargin=1>
You can’t perform that action at this time.