Skip to content

Instantly share code, notes, and snippets.

View csharpfritz's full-sized avatar
💭
Writing code LIVE on twitch.tv/csharpfritz

Jeffrey T. Fritz csharpfritz

💭
Writing code LIVE on twitch.tv/csharpfritz
View GitHub Profile
@csharpfritz
csharpfritz / upload.cs
Created December 31, 2022 21:25
Upload a file to Azure Blob storage
var blobServiceClient = new BlobServiceClient(EnvironmentConfiguration.TableStorageConnectionString);
var containerClient = blobServiceClient.GetBlobContainerClient("cache");
var client = containerClient.GetBlobClient("fileToCache.json");
await client.UploadAsync(myContentToCacheAsStream, true);
@csharpfritz
csharpfritz / seeddata.cs
Last active July 15, 2022 19:16
Fritz's Pizza Data
namespace BlazingPizza.Server;
public static class SeedData
{
public static void Initialize(PizzaStoreContext db)
{
var toppings = new Topping[]
{
new Topping()
{
@csharpfritz
csharpfritz / oldmandev.txt
Last active March 24, 2020 16:43
Old Man Developer Quotes
When I was your age, I coded with peeks and pokes.
I used to code with a chisel and a stone tablet
Back in my day, a fork lift was required for hardware upgrades, we didn't have fancy cloud services with sliders to add more memory and disk space
We didn't have network attached source control... instead I called the intern working as a data entry clerk and dictated my code to them for transcription and storage
I was coding before MCSE meant must consult someone else
https://img.wallpapersafari.com/desktop/1600/900/86/42/SxyIEo.jpg
@csharpfritz
csharpfritz / Nav.cs
Created February 13, 2020 23:32
Complex object binding to a Blazor component as a Parameter
public class Nav
{
public string Title { get; set; }
public string Icon { get; set; }
public string Url { get; set; }
}
@csharpfritz
csharpfritz / repository.cs
Created August 23, 2019 15:09
Sample code demonstrating Generic Repository pattern with EF Core and C#
using System;
using System.Collections.Generic;
using System.Linq;
namespace WebApplication2.Models
{
public interface IGetStoredInDatabase
{
@csharpfritz
csharpfritz / GuessTimeCommand.cs
Created March 7, 2019 19:22
The Quiltoni Time Guess Game
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TwitchLib.Client.Models;
namespace Quiltoni.PixelBot.Commands
{
public class GuessTimeCommandOld : IBotCommand
{
@csharpfritz
csharpfritz / git_tips.cmd
Last active September 6, 2018 14:53
Git tips and tricks
# Delete extra branches that are NOT dev or master
git for-each-ref --format '%(refname:short)' refs/heads --merged | ForEach-Object { If("dev","master" -notcont ains $_) { git branch $_ -d } }

Keybase proof

I hereby claim:

  • I am csharpfritz on github.
  • I am jeffreytfritz (https://keybase.io/jeffreytfritz) on keybase.
  • I have a public key ASAysH3VC9LXGB4H8s40RyF9bED4ZZF3V9f4Ki27FaIgFwo

To claim this, I am signing this object:

@csharpfritz
csharpfritz / keybase.md
Created February 15, 2017 22:02
Keybase identity proof

Keybase proof

I hereby claim:

  • I am csharpfritz on github.
  • I am jeffreytfritz (https://keybase.io/jeffreytfritz) on keybase.
  • I have a public key whose fingerprint is 8378 B9B1 E508 7EFB BAB1 34D8 8A96 CB2B 080C CD83

To claim this, I am signing this object: