{"id":21486181,"url":"https://github.com/grantwinney/blogcodesamples","last_synced_at":"2025-06-25T09:04:51.462Z","repository":{"id":25597857,"uuid":"29032788","full_name":"grantwinney/BlogCodeSamples","owner":"grantwinney","description":"Code samples from my blog","archived":false,"fork":false,"pushed_at":"2024-02-16T23:59:38.000Z","size":295,"stargazers_count":22,"open_issues_count":5,"forks_count":29,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-02-17T16:30:09.043Z","etag":null,"topics":["amazon-api","csharp","dotnet-core","dotnet-framework","dotnet-standard","erlang","eunit","github","iss-notify-api","meck","resharper-annotations","winforms"],"latest_commit_sha":null,"homepage":"http://www.grantwinney.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grantwinney.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-09T19:56:13.000Z","updated_at":"2024-05-30T06:17:20.452Z","dependencies_parsed_at":"2024-05-30T06:17:17.234Z","dependency_job_id":"2fdc563f-17dc-48cf-a301-9fb562edab0a","html_url":"https://github.com/grantwinney/BlogCodeSamples","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/grantwinney/BlogCodeSamples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantwinney%2FBlogCodeSamples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantwinney%2FBlogCodeSamples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantwinney%2FBlogCodeSamples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantwinney%2FBlogCodeSamples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grantwinney","download_url":"https://codeload.github.com/grantwinney/BlogCodeSamples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantwinney%2FBlogCodeSamples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261841943,"owners_count":23217913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-api","csharp","dotnet-core","dotnet-framework","dotnet-standard","erlang","eunit","github","iss-notify-api","meck","resharper-annotations","winforms"],"created_at":"2024-11-23T13:19:47.948Z","updated_at":"2025-06-25T09:04:51.429Z","avatar_url":"https://github.com/grantwinney.png","language":"C#","readme":"# Code Samples - Grant's Blog\n\nThis repository contains some code samples from [my blog posts](https://grantwinney.com). I sometimes upload code to separate repos (like for [C# / .NET](https://github.com/grantwinney/CSharpDotNetExamples) and [WinForms](https://github.com/grantwinney/Surviving-WinForms)), or to [Gist](https://gist.github.com/grantwinney) or [JsFiddle](https://jsfiddle.net/user/grantwinney/fiddles/) for shorter snippets.\n\nThe list below has a link to each blog post, followed by the relevant code for that post.\n\n# APIs\n\n* Discover where the ISS is, where it will be, and who's on it with the ISS Notify API ([blog](https://grantwinney.com/what-is-iss-notify-api/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/APIs/IssNotifyApiWrapper))\n\n# Dev Tools\n\n* Can I compare files using VS Code? ([blog](https://grantwinney.com/how-to-compare-files-using-vs-code/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/DevTools/CompareInVSCode))\n* Cool markdown tricks for GitHub ([blog](https://grantwinney.com/cool-markdown-tricks-for-github/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/DevTools/GitHubTipsTricks))\n* Why doesn't VS 2022 show my WinForms UI at design time? ([blog](http://grantwinney.com/why-doesnt-vs2022-show-my-winforms-ui/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/DevTools/WinFormsDesignerInVS2022))\n* What is a Git alias? ([blog](https://grantwinney.com/what-is-a-git-alias-and-how-do-i-use-it/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/DevTools/GitAliasTemplate))\n\n# Frameworks\n\n## ASP.NET Core\n\n* Similar endpoints, swagger pages, and a DevOps fail ([blog](https://grantwinney.com/similar-endpoints-swagger-pages-and-a-devops-fail), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Frameworks/AspNetCore/MinimalAPIWithSimilarEndpoints))\n\n## WinForms\n\n* Passing Data Between Forms in WinForms ([blog](https://grantwinney.com/passing-data-between-two-forms-in-winforms/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Frameworks/WinForms/PassingDataBetweenForms))\n\n## WPF\n\n* Filtering a ListView in WPF Using a TextBox and CollectionViewSource ([blog](https://grantwinney.com/wpf-filtering-listview-using-textbox-and-collectionviewsource/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Frameworks/WPF/CollectionViewSourceSample))\n\n# Languages\n\n## C#\n\n* An Extension Method to Pass a Column Name to SqlDataReader.GetFieldValue ([blog](https://grantwinney.com/csharp-extension-method-to-pass-column-name-to-getfieldvalue/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Languages/CSharp/SqlDataReaderGetFieldValueByName))\n* How do I convert my code from C# to VB.NET (or from VB.NET to C#)? ([blog](https://grantwinney.com/how-do-i-convert-my-code-from-c-to-vb-net-or-vice-versa/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/CSharpAndVbNetTogether))\n* How to generate and verify TOTP 2FA codes (in C#) ([blog](https://grantwinney.com/a-sample-csharp-app-for-generating-and-verifying-totp-2fa-codes/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Languages/CSharp/2FAQrCode))\n* Obsolete Attribute on a Class is Ignored When an Interface is Involved ([blog](https://grantwinney.com/csharp-obsolete-attribute-on-class-ignored-when-interface-is-involved/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Languages/CSharp/ObsoleteAttributeOnInterfaces))\n* Using an application config file with a .NET Standard app and NUnit 3 ([blog](https://grantwinney.com/how-to-use-an-app-config-file-with-a-net-standard-app-and-nunit-3/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Languages/CSharp/ReadingConfigFile))\n* What is mocking a dependency? ([blog](https://grantwinney.com/what-is-mocking-a-dependency/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Languages/CSharp/MockingDependencies))\n* What is the NUnit constraint model and should you use it? ([blog](https://grantwinney.com/5-reasons-to-use-nunits-constraint-model), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Languages/CSharp/NUnitConstraintModel))\n\n## Erlang\n\n* Calculate Easter and other holidays in Erlang ([blog](https://grantwinney.com/how-to-calculate-easter-and-other-holidays-in-erlang/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Languages/Erlang/CalculateHolidays))\n* Keep your EUnit teardown logic as simple as possible! ([blog](https://grantwinney.com/keep-your-eunit-teardown-logic-as-simple/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Languages/Erlang/MeckTeardownTest))\n* Modify a config file in Erlang ([blog](https://grantwinney.com/how-to-modify-a-config-file-in-erlang/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Languages/Erlang/ConfigFileModifier))\n\n# Misc\n\n* Creating Your First Chrome Extension ([blog](https://grantwinney.com/making-your-first-chrome-extension/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Misc/ChromeExtensionSamples))\n* Running Windows XP in VirtualBox ([blog](https://grantwinney.com/running-windows-xp-in-virtualbox/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Misc/WindowsXPVisualStudio))\n* Tweet random posts from a Ghost blog using AWS Lambda ([blog](https://grantwinney.com/using-aws-lambda-and-tweetinvi-to-tweet-a-random-ghost-blog-post/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Misc/TweetRandomPostFromAGhostBlog))\n* Tweet random blog posts from an RSS feed using AWS Lambda ([blog](https://grantwinney.com/using-aws-lambda-to-tweet-random-posts-from-an-rss-feed/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Misc/TweetRandomFeedItem))\n* Where should I store application data in Windows? ([blog](https://grantwinney.com/where-should-i-store-app-data-in-windows/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Misc/GetKnownFolders))\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantwinney%2Fblogcodesamples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrantwinney%2Fblogcodesamples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantwinney%2Fblogcodesamples/lists"}