Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grantwinney/blogcodesamples
Code samples from my blog
https://github.com/grantwinney/blogcodesamples
amazon-api csharp dotnet-core dotnet-framework dotnet-standard erlang eunit github iss-notify-api meck resharper-annotations winforms
Last synced: about 1 month ago
JSON representation
Code samples from my blog
- Host: GitHub
- URL: https://github.com/grantwinney/blogcodesamples
- Owner: grantwinney
- Created: 2015-01-09T19:56:13.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-02-16T23:59:38.000Z (10 months ago)
- Last Synced: 2024-02-17T16:30:09.043Z (10 months ago)
- Topics: amazon-api, csharp, dotnet-core, dotnet-framework, dotnet-standard, erlang, eunit, github, iss-notify-api, meck, resharper-annotations, winforms
- Language: C#
- Homepage: http://www.grantwinney.com
- Size: 288 KB
- Stars: 22
- Watchers: 2
- Forks: 29
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Code Samples - Grant's Blog
This 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.
The list below has a link to each blog post, followed by the relevant code for that post.
# APIs
* 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))
# Dev Tools
* 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))
* Cool markdown tricks for GitHub ([blog](https://grantwinney.com/cool-markdown-tricks-for-github/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/DevTools/GitHubTipsTricks))
* 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))
* 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))# Frameworks
## ASP.NET Core
* 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))
## WinForms
* 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))
## WPF
* 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))
# Languages
## C#
* 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))
* 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))
* 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))
* 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))
* 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))
* 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))
* 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))## Erlang
* 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))
* 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))
* 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))# Misc
* Creating Your First Chrome Extension ([blog](https://grantwinney.com/making-your-first-chrome-extension/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Misc/ChromeExtensionSamples))
* Running Windows XP in VirtualBox ([blog](https://grantwinney.com/running-windows-xp-in-virtualbox/), [code](https://github.com/grantwinney/BlogCodeSamples/tree/master/Misc/WindowsXPVisualStudio))
* 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))
* 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))
* 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))