Skip to content

Instantly share code, notes, and snippets.

View jamesshenry's full-sized avatar

James jamesshenry

  • Vigo Software
  • UK
  • 04:38 (UTC +01:00)
View GitHub Profile
@jamesshenry
jamesshenry / codebase.ps1
Created September 26, 2025 11:49
Powershell to extract code file content from a source directory
$repoRoot = Resolve-Path "$PSScriptRoot/.."
Write-Host $repoRoot
$sourceDirectory = Join-Path $repoRoot 'src'
Write-Host $sourceDirectory
$outputFile = "$repoRoot/.github/instructions/codebase.txt"
Write-Host $outputFile
{
"license": "MIT",
"url": "https://github.com/lukeyou05/tacky-borders/releases/download/v1.3.1/tacky-borders-v1.3.1.zip",
"hash": "6DA529D21C0DC4EB6F07D6D253951A21637812C7F61E80686AEB9530613A78AD",
"bin": "tacky-borders.exe",
"version": "1.3.1",
"homepage": "https://github.com/lukeyou05/tacky-borders"
}
@jamesshenry
jamesshenry / project-ideas01.md
Created December 5, 2024 00:24 — forked from MWins/project-ideas01.md
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@jamesshenry
jamesshenry / project-ideas01.md
Created December 5, 2024 00:24 — forked from MWins/project-ideas01.md
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@jamesshenry
jamesshenry / learn.lua
Created December 5, 2024 00:24 — forked from tylerneylon/learn.lua
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@jamesshenry
jamesshenry / learn.lua
Created December 5, 2024 00:24 — forked from tylerneylon/learn.lua
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@jamesshenry
jamesshenry / Write-Log.ps1
Created October 25, 2023 14:54
PowerShell setup Write-Log function
$logFolder = "$PSScriptRoot\logs\"
# if (-not (Test-Path $logFolder)) { New-Item $logFolder -ItemType Directory }
$logPath = Join-Path -Path $logFolder -ChildPath "$((Get-Date).ToString("yyyy-MM-dd")).log"
if (-not (Test-Path $logPath)) { New-Item $logPath -ItemType File -Force }
Get-ChildItem $logFolder | ForEach-Object {
if ($_.CreationTime -lt (Get-Date).AddDays(-7)) {
Remove-Item $_.FullName
}
}
@jamesshenry
jamesshenry / local_connection_strings
Last active June 20, 2023 13:21
Connection String examples for local database connections
localdb: "Server=(localdb)\MSSQLLocalDB;Integrated Security=true;Initial Catalog=<SET_DB_NAME>"
postgresql: "Server=localhost;Port=5432;Database=my_db;Username=postgres;Password=postgres"
@jamesshenry
jamesshenry / husky-setup.ps1
Last active April 12, 2023 22:30
PowerShell script that adds Husky.NET to project and creates default commit linter
if ((Test-Path .\.config\dotnet-tools.json) -eq $false) {
dotnet new tool-manifest
}
dotnet tool install Husky
dotnet husky install
dotnet husky add commit-msg -c @"
dotnet husky run --name commit-message-linter --args "`$1"
"@
$huskyDir = "$PSScriptRoot\.husky"
$task = [PsCustomObject]@{