Skip to content

Instantly share code, notes, and snippets.

@lancehilliard
lancehilliard / Windows10ResetLocalAccountPasswordUsingInstallDisk.md
Last active November 17, 2022 15:32
Windows 10: Reset Local Account Password using Install Disk

Windows 10: Reset Local Account Password using Install Disk

Windows 10's install disk is itself bootable and can help us reset the password on a Local Account (not a Microsoft account) of the existing Windows 10 install.

This document doesn't exhaustively detail how to perform every step. It also doesn't discuss consequences of changing a Windows 10 account password, especially when encrypted filesystems are in use. Its intended audience is the user who has researched both (see Credit below as a starting point).

This document also assumes that the existing Windows 10 install is healthy.

This process exploits the fact that our existing Windows 10 install allows us to execute Windows\system32\Utilman.exe before/without logging in, by clicking on the login screen's icon for Ease of Access (formerly Utility Manager). By renaming cmd.exe to Utilman.exe before booting our existing Windows 10 install, we can later get a Command Prompt in the existing Windows 10 install before/without lo

@lancehilliard
lancehilliard / ExampleEntities.cs
Created October 20, 2018 01:50
Basic SaveChanges() override for setting existing CreatedBy/CreatedUtc/LastModifiedBy/LastModifiedUtc columns on EF tables.
public partial class ExampleEntities {
private delegate void ColumnValueSetter(DbPropertyEntry entry, DateTimeOffset now);
private static readonly Dictionary<string, ColumnValueSetter> ControlledColumns = new Dictionary<string, ColumnValueSetter> {
{"CreatedBy", ColumnValueSetters.CreatedBy}
, {"CreatedUtc", ColumnValueSetters.CreatedUtc}
, {"LastModifiedBy", ColumnValueSetters.LastModifiedBy}
, {"LastModifiedUtc", ColumnValueSetters.LastModifiedUtc}
};
@lancehilliard
lancehilliard / kroger_clicklist_products_display_changer.js
Last active April 23, 2018 21:39
[userscript] Change how certain Kroger products are displayed to make ClickList shopping easier
// ==UserScript==
// @name Kroger ClickList Products Display Changer
// @namespace cc.digitalcreations.kroger
// @version 0.1
// @downloadURL https://gist.github.com/lancehilliard/1353475392345d30cd20f53e6ee8bc61#file-kroger_clicklist_products_display_changer.js
// @description Change how certain Kroger products are displayed to make ClickList shopping easier
// @author lancehilliard
// @match https://www.kroger.com/products/*
// @grant none
// @require http://code.jquery.com/jquery-latest.js
@lancehilliard
lancehilliard / Userscript: NS2-only UWE Discussions
Created September 4, 2017 07:01
Shows only non-webbed NS2 threads in UWE Discussions display
// ==UserScript==
// @name NS2-only UWE Discussions
// @match https://forums.unknownworlds.com/discussions*
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
(function() {
$('a[href*="subnautica"], a[href*="off-topic"], a[href*="other-discussions"], span[title="Webbed"]').closest('tr').hide();
setTimeout(function(){
$("html,body").animate({scrollTop: 400}, 1);
set FFMPEG_EXE="C:\Program Files (x86)\Screen Capturer Recorder\configuration_setup_utility\vendor\ffmpeg\bin\ffmpeg.exe"
set OUTPUT_INTERVAL_IN_SECONDS=60
set OUTPUT_DIR_WITHOUT_TRAILING_SLASH=%userprofile%\documents\instantreplay
set OUTPUT_FILES_TO_KEEP=120
:loop
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set timestamp=%%I
set datetimestart=%timestamp:~0,8%-%timestamp:~8,4%_%timestamp:~12,2%
%FFMPEG_EXE% -loglevel info -t %OUTPUT_INTERVAL_IN_SECONDS% -f dshow -video_device_number 0 -i video="screen-capture-recorder" -vcodec libx264 -pix_fmt yuv420p -s hd720 -preset ultrafast -vsync vfr -acodec libmp3lame -f mpegts - | %FFMPEG_EXE% -f mpegts -i - -c copy "%OUTPUT_DIR_WITHOUT_TRAILING_SLASH%\%datetimestart%.mkv"
@lancehilliard
lancehilliard / eventHook20120827_1.txt
Created August 27, 2012 16:37
Event.Hook("ClientConnected", InSameFileHandler) not binding...
;game_setup.xml (Step 1):
<game>
<client>ta/Client.lua</client>
<server>ta/Server.lua</server>
</game>
-------------------------------------------------------------------------------------
;ta/Server.lua (Step 2):
Script.Load("lua/Server.lua")
Script.Load("ta/ServerInitialize.lua")
@lancehilliard
lancehilliard / AllowSaveAllInVisualStudioWhenLyncScreenSharingIsBeingUsed.ahk
Created May 9, 2012 20:40
AHK script to SaveAll in Visual Studio while Screen Sharing using Lync 2010
; Control key ^
; Alt key !
; Shift key +
; Windows key #
; this must remain at top of file
SetTitleMatchMode 2
;Allows for the script to be reloaded everytime it's saved
SetTimer,UPDATEDSCRIPT,1000
@lancehilliard
lancehilliard / gist:1934168
Created February 28, 2012 18:30
ImageGear for .NET Online Demo (http://igdemos.accusoft.com/imageGearAspNet19/Demo/) "FileList" object
var FileList = {
currentPage: null,
fileList: [],
documentInfo: {},
get_fileCount: function() {
return FileList.fileList.length;
},
set_currentPage: function(newCurrentPage) {
@lancehilliard
lancehilliard / gist:1934114
Created February 28, 2012 18:20
ImageGear for .NET Online Demo (http://igdemos.accusoft.com/imageGearAspNet19/Demo/) "Next Page" command button markup
<img class="toolbarButton toolbarPageNext" alt="Move to Next Page" src="DemoImages/demo_btn32_page_next.png" jQuery1330452980384="46" command="function onToolbarPageNext() {
FileList.set_currentPage(FileList.get_currentPage().nextPage());
}"/>
@lancehilliard
lancehilliard / CarBluetooth.prf.xml
Created February 18, 2012 04:51
The Tasker profile I use to fire tasks when I enter and exit my car... (dependent on gists 1857458 & 1857471)
<class cl="TaskerData" sr="">
<tv>1.2u2m</tv>
<class cl="Profile" sr="prof34">
<cdate>1312544125885</cdate>
<id>34</id>
<mid0>7</mid0>
<mid1>37</mid1>
<nme>CarBluetooth</nme>
<class cl="StateContext" sr="con0">
<code>3</code>