-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5,432 changed files
with
306,313 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# Define the folder containing the blog posts | ||
$postsFolder = "C:\Users\MartinHinshelwoodNKD\source\repos\protptype\content\resources\blog" | ||
|
||
# Improved regular expression to remove GUIDs anywhere in the filename | ||
$guidPattern = "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}" | ||
|
||
# Initialize the counter | ||
$counter = 1 | ||
|
||
function Clean-ImageName { | ||
param ( | ||
[string]$name, | ||
[int]$counter | ||
) | ||
|
||
# Extract file extension | ||
$extension = [System.IO.Path]::GetExtension($name) | ||
$baseName = [System.IO.Path]::GetFileNameWithoutExtension($name) | ||
# Remove specific text | ||
$baseName = $baseName-replace "GWB-WindowsLiveWriter-", "" | ||
$baseName = $baseName-replace "GWB-Windows-Live-Writer-", "" | ||
|
||
# Remove GUIDs | ||
$baseName = $baseName -replace $guidPattern, "" | ||
|
||
# Append the counter to the base name | ||
$cleanedBaseName = "$baseName-$counter" | ||
|
||
# Combine the cleaned base name with the original extension | ||
$cleanedName = "$cleanedBaseName$extension" | ||
|
||
Write-Host "Original Name: $name" | ||
Write-Host "Cleaned Name: $cleanedName" | ||
|
||
return $cleanedName | ||
} | ||
|
||
function Clean-ImageNameNasty { | ||
param ( | ||
[string]$name, | ||
[int]$counter | ||
) | ||
|
||
# Extract file extension | ||
$extension = [System.IO.Path]::GetExtension($name) | ||
$baseName = "image-" + $counter | ||
# Combine the cleaned base name with the original extension | ||
$cleanedName = "$baseName$extension" | ||
|
||
Write-Host "Original Name: $name" | ||
Write-Host "Cleaned Name: $cleanedName" | ||
|
||
return $cleanedName | ||
} | ||
|
||
|
||
function Process-PostFolder { | ||
param ( | ||
[string]$postFolder | ||
) | ||
|
||
$imagesFolder = Join-Path -Path $postFolder -ChildPath "images" | ||
$indexFile = Join-Path -Path $postFolder -ChildPath "index.md" | ||
|
||
if (-Not (Test-Path -Path $imagesFolder)) { | ||
Write-Host "Images folder not found: $imagesFolder" | ||
return | ||
} | ||
|
||
$renameMap = @{} | ||
|
||
# Process images | ||
$imageFiles = Get-ChildItem -Path $imagesFolder -File | ||
foreach ($image in $imageFiles) { | ||
$oldPath = $image.FullName | ||
|
||
# Only process if path length is more than 255 characters | ||
if ($oldPath.Length -gt 255) { | ||
$newName = Clean-ImageName -name $image.Name -counter $counter | ||
$newPath = Join-Path -Path $imagesFolder -ChildPath $newName | ||
if ($newPath.Length -gt 255) { | ||
$newName = Clean-ImageNameNasty -name $image.Name -counter $counter | ||
$newPath = Join-Path -Path $imagesFolder -ChildPath $newName | ||
} | ||
|
||
if ($oldPath -ne $newPath) { | ||
$renameMap[$image.Name] = $newName | ||
Rename-Item -Path $oldPath -NewName $newPath | ||
Write-Host "Renamed: $oldPath -> $newPath" | ||
$counter++ # Increment counter for the next file | ||
} | ||
} | ||
} | ||
|
||
# Update index.md | ||
if ((Test-Path -Path $indexFile) -and ($renameMap.Count -gt 0)) { | ||
$content = Get-Content -Path $indexFile -Raw | ||
|
||
foreach ($oldName in $renameMap.Keys) { | ||
$newName = $renameMap[$oldName] | ||
$content = $content -replace [regex]::Escape($oldName), $newName | ||
} | ||
|
||
Set-Content -Path $indexFile -Value $content | ||
Write-Host "Updated $indexFile with new image names." | ||
} | ||
} | ||
|
||
#Iterate through each post folder | ||
$directories = Get-ChildItem -Path $postsFolder -Directory | ||
foreach ($dir in $directories) { | ||
Process-PostFolder -postFolder $dir.FullName | ||
} | ||
#Process-PostFolder -postFolder "C:\Users\MartinHinshelwoodNKD\source\repos\protptype\content\resources\blog\2009-10-20-installing-visual-studio-2010-team-foundation-server-on-windows-vista-in-3-minutes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
post: | ||
title: Ahaaaa! | ||
link: https://nkdagility.com/blog/ahaaaa/ | ||
pubDate: Thu, 22 Jun 2006 14:35:00 +0000 | ||
creator: MrHinsh | ||
guid: | ||
_: http://geekswithblogs.net/hinshelm/archive/2006/06/22/82729.aspx | ||
$: | ||
isPermaLink: 'false' | ||
description: '' | ||
encoded: | ||
- "As you can see from my other posts, I seem to be having a problem putting code into the posts. I will persevere and see if I can get the hang of it, then fix the other posts...<div style=\"padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px\" class=\"wlWriterEditableSmartContent\">Technorati Tags: <a href=\"http://technorati.com/tags/Misc\" rel=\"tag\">Misc</a>\_</div>" | ||
- '' | ||
post_id: '469' | ||
post_date: '2006-06-22 14:35:00' | ||
post_date_gmt: '2006-06-22 14:35:00' | ||
post_modified: '2006-06-22 14:35:00' | ||
post_modified_gmt: '2006-06-22 14:35:00' | ||
comment_status: open | ||
ping_status: open | ||
post_name: ahaaaa | ||
status: publish | ||
post_parent: '0' | ||
menu_order: '0' | ||
post_type: post | ||
post_password: '' | ||
is_sticky: '0' | ||
category: {} | ||
postmeta: | ||
- meta_key: authorsure_include_css | ||
meta_value: '' | ||
- meta_key: dsq_thread_id | ||
meta_value: '349313966' | ||
- meta_key: _views | ||
meta_value: '1' | ||
- meta_key: _thumbnail_id | ||
meta_value: '5063' | ||
- meta_key: _wpbitly | ||
meta_value: http://nkdalm.net/1gwJWj8 | ||
- meta_key: _jetpack_related_posts_cache | ||
meta_value: >- | ||
a:1:{s:32:"8f6677c9d6b0f903e98ad32ec61f8deb";a:2:{s:7:"expires";i:1473467000;s:7:"payload";a:3:{i:0;a:1:{s:2:"id";i:308;}i:1;a:1:{s:2:"id";i:231;}i:2;a:1:{s:2:"id";i:144;}}}} | ||
- meta_key: _wpghs_github_path | ||
meta_value: _posts/2006-06-22-ahaaaa.md | ||
- meta_key: _sha | ||
meta_value: '' | ||
- meta_key: _wpml_media_has_media | ||
meta_value: '1' | ||
- meta_key: _tribe_ticket_capacity | ||
meta_value: '0' | ||
- meta_key: _tribe_ticket_version | ||
meta_value: 4.11.4 | ||
- meta_key: ekit_post_views_count | ||
meta_value: '495' | ||
comment: | ||
comment_id: '6' | ||
comment_author: Disqus & Chrome with non-support | Visual Studio ALM | ||
comment_author_email: '' | ||
comment_author_url: http://blog.hinshelwood.com/disqus-chrome-with-non-support/ | ||
comment_author_IP: 184.168.230.128 | ||
comment_date: '2011-07-05 06:33:04' | ||
comment_date_gmt: '2011-07-05 13:33:04' | ||
comment_content: >- | ||
[...] Go to any single blog post page, but the one depicted in the | ||
screenshot would be you best bet (http://blog.hinshelwood.com/ahaaaa/) its | ||
an old post, but short so loads quickly. >>a step-by-step process to | ||
reproduce the issue [...] | ||
comment_approved: '1' | ||
comment_type: pingback | ||
comment_parent: '0' | ||
comment_user_id: '0' | ||
commentmeta: | ||
- meta_key: akismet_result | ||
meta_value: 'false' | ||
- meta_key: akismet_history | ||
meta_value: >- | ||
a:4:{s:4:"time";s:15:"1309872784.9267";s:7:"message";s:28:"Akismet | ||
cleared this comment";s:5:"event";s:9:"check-ham";s:4:"user";s:0:"";} | ||
- meta_key: akismet_history | ||
meta_value: >- | ||
a:4:{s:4:"time";s:14:"1310418845.867";s:7:"message";s:46:"MrHinsh | ||
changed the comment status to | ||
approved";s:5:"event";s:15:"status-approved";s:4:"user";s:7:"MrHinsh";} |
Binary file added
BIN
+2.46 KB
content/resources/blog/2006-06-22-ahaaaa/images/nakedalm-logo-128-link-1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
id: "469" | ||
title: "Ahaaaa!" | ||
date: "2006-06-22" | ||
tags: | ||
- "off-topic" | ||
coverImage: "nakedalm-logo-128-link-1-1.png" | ||
author: "MrHinsh" | ||
type: "post" | ||
slug: "ahaaaa" | ||
--- | ||
|
||
As you can see from my other posts, I seem to be having a problem putting code into the posts. I will persevere and see if I can get the hang of it, then fix the other posts... | ||
|
||
Technorati Tags: [Misc](http://technorati.com/tags/Misc) | ||
|
||
|
||
|
91 changes: 91 additions & 0 deletions
91
content/resources/blog/2006-06-22-custom-ui-colour-scheme-for-windows-forms-net/data.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
post: | ||
title: Custom UI colour scheme for Windows Forms .NET | ||
link: https://nkdagility.com/blog/custom-ui-colour-scheme-for-windows-forms-net/ | ||
pubDate: Thu, 22 Jun 2006 14:20:00 +0000 | ||
creator: MrHinsh | ||
guid: | ||
_: >- | ||
http://geekswithblogs.net/hinshelm/archive/2006/06/22/customuicoloursceamforwindowsformsnet.aspx | ||
$: | ||
isPermaLink: 'false' | ||
description: '' | ||
encoded: | ||
- "<p>The easyest way to customise you display of your ToolStrip, MainMenu and StatusBar is to use a custom ColorTable.</p>\n<p>Just inherit from the ProfessionalColorRenderer and override what you want, with the colors you want:</p>\n<!-- code formatted by http://manoli.net/csharpformat/ -->\n<div class=\"csharpcode\">\n<pre><span class=\"lnum\"> 1: </span><span class=\"kwrd\">Public</span> <span class=\"kwrd\">Class</span> MortgagesPlcColorTable</pre>\n<pre><span class=\"lnum\"> 2: </span> <span class=\"kwrd\">Inherits</span> ProfessionalColorTable</pre>\n<pre><span class=\"lnum\"> 3: </span>\_</pre>\n<pre><span class=\"lnum\"> 4: </span> <span class=\"kwrd\">Public</span> <span class=\"kwrd\">Overrides</span> <span class=\"kwrd\">ReadOnly</span> <span class=\"kwrd\">Property</span> ButtonCheckedHighlightBorder() <span class=\"kwrd\">As</span> System.Drawing.Color</pre>\n<pre><span class=\"lnum\"> 5: </span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 6: </span> <span class=\"kwrd\">Return</span> <span class=\"kwrd\">MyBase</span>.ButtonCheckedHighlightBorder</pre>\n<pre><span class=\"lnum\"> 7: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 8: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Property</span></pre>\n<pre><span class=\"lnum\"> 9: </span>\_</pre>\n<pre><span class=\"lnum\"> 10: </span> <span class=\"kwrd\">Public</span> <span class=\"kwrd\">Overrides</span> <span class=\"kwrd\">ReadOnly</span> <span class=\"kwrd\">Property</span> MenuItemPressedGradientMiddle() <span class=\"kwrd\">As</span> System.Drawing.Color</pre>\n<pre><span class=\"lnum\"> 11: </span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 12: </span> <span class=\"kwrd\">Return</span> Color.FromArgb(91, 91, 91)</pre>\n<pre><span class=\"lnum\"> 13: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 14: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Property</span></pre>\n<pre><span class=\"lnum\"> 15: </span>\_</pre>\n<pre><span class=\"lnum\"> 16: </span> <span class=\"kwrd\">Public</span> <span class=\"kwrd\">Overrides</span> <span class=\"kwrd\">ReadOnly</span> <span class=\"kwrd\">Property</span> ToolStripContentPanelGradientBegin() <span class=\"kwrd\">As</span> System.Drawing.Color</pre>\n<pre><span class=\"lnum\"> 17: </span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 18: </span> <span class=\"kwrd\">Return</span> Color.FromArgb(80, 80, 80)</pre>\n<pre><span class=\"lnum\"> 19: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 20: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Property</span></pre>\n<pre><span class=\"lnum\"> 21: </span>\_</pre>\n<pre><span class=\"lnum\"> 22: </span> <span class=\"kwrd\">Public</span> <span class=\"kwrd\">Overrides</span> <span class=\"kwrd\">ReadOnly</span> <span class=\"kwrd\">Property</span> ToolStripContentPanelGradientEnd() <span class=\"kwrd\">As</span> System.Drawing.Color</pre>\n<pre><span class=\"lnum\"> 23: </span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 24: </span> <span class=\"kwrd\">Return</span> Color.WhiteSmoke</pre>\n<pre><span class=\"lnum\"> 25: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 26: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Property</span></pre>\n<pre><span class=\"lnum\"> 27: </span>\_</pre>\n<pre><span class=\"lnum\"> 28: </span> <span class=\"kwrd\">Public</span> <span class=\"kwrd\">Overrides</span> <span class=\"kwrd\">ReadOnly</span> <span class=\"kwrd\">Property</span> ToolStripDropDownBackground() <span class=\"kwrd\">As</span> System.Drawing.Color</pre>\n<pre><span class=\"lnum\"> 29: </span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 30: </span> <span class=\"kwrd\">Return</span> Color.FromArgb(91, 91, 91)</pre>\n<pre><span class=\"lnum\"> 31: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 32: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Property</span></pre>\n<pre><span class=\"lnum\"> 33: </span>\_</pre>\n<pre><span class=\"lnum\"> 34: </span> <span class=\"kwrd\">Public</span> <span class=\"kwrd\">Overrides</span> <span class=\"kwrd\">ReadOnly</span> <span class=\"kwrd\">Property</span> ToolStripGradientBegin() <span class=\"kwrd\">As</span> System.Drawing.Color</pre>\n<pre><span class=\"lnum\"> 35: </span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 36: </span> <span class=\"kwrd\">Return</span> Color.FromArgb(80, 80, 80)</pre>\n<pre><span class=\"lnum\"> 37: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Get</span></pre>\n<pre><span class=\"lnum\"> 38: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Property</span></pre>\n<pre><span class=\"lnum\"> 39: </span>\_</pre>\n<pre><span class=\"lnum\"> 40: </span> <span class=\"kwrd\">End</span> <span class=\"kwrd\">Class</span></pre>\n</div>\n<p>Once you have done this, all you need now is to add it to your contols:</p>\n<!-- code formatted by http://manoli.net/csharpformat/ -->\n<div>\n<pre><span> 1: </span> System.Windows.Forms.ToolStripManager.Renderer = <span>New</span> ToolStripProfessionalRenderer(<span>New</span> MortgagesPlc.Windows.Forms.MortgagesPlcColorTable)</pre>\n</div>\n<p>All done! If you have problems you can inherit from the ToolStrip control and change the renderer in the constructor...</p><div style=\"padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px\" class=\"wlWriterEditableSmartContent\">Technorati Tags: <a href=\"http://technorati.com/tags/.NET\" rel=\"tag\">.NET</a>\_</div>" | ||
- '' | ||
post_id: '466' | ||
post_date: '2006-06-22 14:20:00' | ||
post_date_gmt: '2006-06-22 14:20:00' | ||
post_modified: '2006-06-22 14:20:00' | ||
post_modified_gmt: '2006-06-22 14:20:00' | ||
comment_status: open | ||
ping_status: open | ||
post_name: custom-ui-colour-scheme-for-windows-forms-net | ||
status: publish | ||
post_parent: '0' | ||
menu_order: '0' | ||
post_type: post | ||
post_password: '' | ||
is_sticky: '0' | ||
category: {} | ||
postmeta: | ||
- meta_key: authorsure_include_css | ||
meta_value: '' | ||
- meta_key: dsq_thread_id | ||
meta_value: '317914117' | ||
- meta_key: _edit_last | ||
meta_value: '3' | ||
- meta_key: _flattr_post_language | ||
meta_value: '' | ||
- meta_key: _flattr_post_category | ||
meta_value: '' | ||
- meta_key: _flattr_post_hidden | ||
meta_value: '' | ||
- meta_key: _flattr_btn_disabled | ||
meta_value: '' | ||
- meta_key: _wp_old_slug | ||
meta_value: custom-ui-colour-sceam-for-windows-forms-net | ||
- meta_key: robotsmeta | ||
meta_value: index,follow | ||
- meta_key: _views | ||
meta_value: '1' | ||
- meta_key: _thumbnail_id | ||
meta_value: '7080' | ||
- meta_key: authorsure_include_css | ||
meta_value: '' | ||
- meta_key: _views_template | ||
meta_value: '0' | ||
- meta_key: _wpbitly | ||
meta_value: http://nkdalm.net/16CMN4h | ||
- meta_key: _jetpack_related_posts_cache | ||
meta_value: >- | ||
a:1:{s:32:"8f6677c9d6b0f903e98ad32ec61f8deb";a:2:{s:7:"expires";i:1473389695;s:7:"payload";a:3:{i:0;a:1:{s:2:"id";i:91;}i:1;a:1:{s:2:"id";i:123;}i:2;a:1:{s:2:"id";i:214;}}}} | ||
- meta_key: _wpghs_github_path | ||
meta_value: _posts/2006-06-22-custom-ui-colour-scheme-for-windows-forms-net.md | ||
- meta_key: _sha | ||
meta_value: '' | ||
- meta_key: _wpml_media_has_media | ||
meta_value: '1' | ||
- meta_key: _tribe_ticket_capacity | ||
meta_value: '0' | ||
- meta_key: _tribe_ticket_version | ||
meta_value: 4.11.4 | ||
- meta_key: ekit_post_views_count | ||
meta_value: '403' | ||
comment: | ||
comment_id: '5' | ||
comment_author: Richard McLaughlin | ||
comment_author_email: [email protected] | ||
comment_author_url: '' | ||
comment_author_IP: '' | ||
comment_date: '2011-08-30 14:18:00' | ||
comment_date_gmt: '2011-08-30 14:18:00' | ||
comment_content: Its scheme not sceam | ||
comment_approved: '1' | ||
comment_type: comment | ||
comment_parent: '0' | ||
comment_user_id: '0' | ||
commentmeta: | ||
- meta_key: dsq_parent_post_id | ||
meta_value: '' | ||
- meta_key: dsq_post_id | ||
meta_value: '298698642' |
Binary file added
BIN
+1.02 KB
...-ui-colour-scheme-for-windows-forms-net/images/metro-binary-vb-128-link-1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.