Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am stevehansen on github.
  • I am stevehansen (https://keybase.io/stevehansen) on keybase.
  • I have a public key ASBBMwbQRmOT5pwoLEWG0uv4XwyDFq3k5xTmhTWb1BADjgo

To claim this, I am signing this object:

using System;
using System.Diagnostics;
using System.Runtime.Serialization;
namespace Unitialized
{
class Program
{
static void Main(string[] args)
{
# https://stackoverflow.com/a/16537996/295296
$documents_path = 'c:\doc2pdf'
$word_app = New-Object -ComObject Word.Application
# This filter will find .doc as well as .docx documents
Get-ChildItem -Path $documents_path -Filter *.doc? | ForEach-Object {
$document = $word_app.Documents.Open($_.FullName)
@stevehansen
stevehansen / fetch.js
Last active March 14, 2023 13:16 — forked from nestarz/fetchNDJSON.js
NDJSON File Streaming using browser Stream API + Loading Progress
const splitOn = "\n";
const newNdJsonStream = () => {
let buffer = "";
const decoder = new TextDecoder();
return new TransformStream<Uint8Array, object>({
async transform(chunk, controller) {
chunk = await chunk;
BEGIN MESSAGE.
JolMgm9Sld2fV3T KkxDz7TdSiUnQz6 ZKqGdHeRc5vXs9n gdez97Ro5q4HDXm
VrBYCTd7szvgnTj r08naSYj1smTCKq 6Xr2MZHgg72VPwb 1GDZ9xbGbapPgWs
kxY7rhKfFRMVnQz AuHevPvppSvcrU0 1F0Zl4DTh0B7wIJ wtqQgwkCf5pLBcp
KkDTpYau1O85jkb dIHEnwO2gJSuc7P i7pQf0aLMzWSiL.
END MESSAGE.
@stevehansen
stevehansen / copy-iso-to-stick.cmd
Created October 9, 2023 08:12
Create a bootable Windows USB stick
@echo off
REM in this sample F: is the drive where the .iso is mounted, E: is the stick, it should be formatted as ntfs
REM copy over all files from the .iso to the stick
xcopy F:\*.* E: /s/e/f
REM make the stick bootable
F:\Boot\Bootsect /NT60 E: /force /mbr