Skip to content

Instantly share code, notes, and snippets.

@ScottKirvan
ScottKirvan / r.md
Created November 9, 2023 19:26
regex - match files with (1), (2), etc in the filename - to clean up photo directories

find . -regex '.*/.*[^.]+ ([1-9])\.[^.]+$' wil list the dup files. Pipe that to a text file, modify it, and source it.

To delete or move a resulting file like, ./IMG_1286 (1).PNG, you'll need to escate the space and parens before you can delete (rm) them.

Example: rm ./IMG_1286\ \(1\).PNG

@ScottKirvan
ScottKirvan / esc.md
Last active November 4, 2023 21:11
Invoking [ESC] key on iPad or iPhone with attached keyboard

On iPad/iOS, the esc key is trapped as a home key -- this can be disabling if you need the esc key for shells, editors, etc.
Good news is, that there's an alternative and I found it pretty quick an easy to adapt to it:

To invoke Escape, press Command + period (.) on the keyboard.

In VSCode on the iPad, as a vi user, this wouldn't work. A vim alternative to escape is Ctrl + [

#vi #vim #iOS #iPadOS #iPad #iPhone #tech #coders #esc #escape #vscode

@ScottKirvan
ScottKirvan / SubstrateBytesPerPixel.md
Created October 12, 2023 01:36
Fix Unreal Substrate Clearcoat

set cvar: r.Substrate.BytesPerPixel=128

default is 80, which doesn't work with clearcoat style materials.

@ScottKirvan
ScottKirvan / jekyl_minimal.md
Created May 18, 2023 19:22
bare-bones, minimal Jekyll setup for Github Pages
  1. Create a new repository on GitHub with the name .github.io, where is your GitHub username.

  2. Clone the repository to your local machine using Git.

  3. Create a new file called index.md in the repository's root directory. This will serve as the homepage for your GitHub Pages site.

  4. Add the necessary Jekyll front matter to the index.md file. At a minimum, it should include the following YAML code:

---
@ScottKirvan
ScottKirvan / gist:825e4b0df47b02cbc1d69e978bbcfcf9
Last active May 3, 2023 18:53
Package fontspec Error: The font "TimesNewRoman" cannot be found. - resolved

fontspec error in WSL

Using latex/luatex in WSL, you may find yourself wanting to grab fonts you're used to working with, like TimesNewRoman. Microsoft Fonts aren't available and usable by default.

I believe there's a way to make WSL see the existing Windows system fonts, but here's another quick fix that will work on any Ubuntu/Debian install.

The error:

Package fontspec Error: The font "TimesNewRoman" cannot be found.
@ScottKirvan
ScottKirvan / gist:81fea773a2579b5fa1871e5afe36bafa
Last active April 26, 2023 21:40
Windows: How to add batch-script action to Right Click menu

Unreal Blueprints 5.2 - 'Get Editor World' deprecated - resolved

  • UE 5.2
  • imported Automotive Mtls assets
  • right clicking on any asset in the asset browser throws an Editor Error with assetActionUtility UTIL_AngleMapConversion

Message Log:

/Game/AutomotiveMaterials/Utils/AngleConvertUtility/UTIL_AngleMapConversion.UTIL_AngleMapConversion needs to be re-saved and possibly upgraded.

Minimal Unreal New Project Setup

Skip the Launcher and create a new project directly

What is the minimal number of required files and folders needed to create an Unreal Engine Project? Surprisingly little -- one, one-line file to be specific -- and you can launch without needing to use the Launcher or have unreal prompt for a Template project.

Maybe the interesting thing here is that this is an option for some kind of automation. It's literally just create a one-line file, "open" it, and (maybe) select your chosen Unreal version.

Given the number of dev and test files I create, this is a nice direct way to get up and going.

@ScottKirvan
ScottKirvan / install_nodejs.md
Last active March 26, 2023 19:58
Discord Node.js dev notes:

Discord Node.js dev notes:

Installation: WSL - Ubuntu 22.04:

sudo apt install npm
shutdown -r now  # THIS  DOESN'T REALLY WORK, BUT YOU NEED TO EXIT THE SHELL AN LOG BACK IN -- cal also do an EXPORT
npm init -y
npm install discord.js
npm -v && node -v

9.5.0