Skip to content

Instantly share code, notes, and snippets.

View idusortus's full-sized avatar

Sam Johnson idusortus

  • FS-Consulting
  • Green Bay, WI
  • 05:25 (UTC -05:00)
View GitHub Profile
public class GrowingUp
{
public static void main (String args[])
{
Infant newBorn = new Infant("Conrad");
System.out.println("\nHere is what an Infant can do:");
newBorn.crawl();
Child aChild = new Child("Bryce");
@idusortus
idusortus / GitBasicsForGreenbayaa.txt
Last active April 30, 2021 15:31
Git Installation and Usage Basics for GBAA Custodians
If you have a Lynda.com account, this video provides a lightweight overview of Git and GitHub.
- https://www.lynda.com/GitHub-tutorials/GitHub-Web-Designers/162276-2.html
Don't have a Lynda account? You can use your Brown County Library card to get free access!
- https://www.lynda.com/portal/sip?org=browncountylibrary.org
The (Optional) steps are helpful for Windows users who prefer a Unix style working environment. Note that Git is not a prerequestite for Cmder. I beleive Cmder will work just fine without installing Git First. I installed Cmder after installing Git so I cannot confirm.
Command Line Summary:
- Download and install Git https://git-scm.com/downloads
[
{
"name": "Its in the Book",
"slug": "monday-dcdc",
"day": 1,
"time": "19:30",
"location": "DC DC Divine Center",
"updated": "2019-05-04 14:32:23",
"url": "http://greenbayaa.org/meetings.html",
"types": [
[
{
"name": "Its in the Book",
"slug": "monday-dcdc",
"day": 1,
"time": "19:30",
"location": "DC DC Divine Center",
"updated": "2019-05-04 14:32:23",
"url": "http://greenbayaa.org/meetings.html",
"types": [
@idusortus
idusortus / meeting-guide-greenbayaa
Last active May 13, 2019 14:10
meeting-guide-greenbayaa
[{"name":"","slug":"0-NeverTooEarly","day":0,"time":"04:30","location":"218 Club","notes":"","locationNotes":"","updated":"2019-05-11 12:13:33","types":["c"],"address":"218 S. Oneida","city":"Green Bay","state":"WI"},{"name":"Very Early Birds","slug":"0-Very Early Birds","day":0,"time":"06:00","location":"218 Club","notes":"","locationNotes":"","updated":"2019-05-11 12:13:33","types":["c"],"address":"218 S. Oneida","city":"Green Bay","state":"WI"},{"name":"Early Birds","slug":"0-Early Birds","day":0,"time":"07:30","location":"218 Club","notes":"Back Room","locationNotes":"","updated":"2019-05-11 12:13:33","types":["c"],"address":"218 S. Oneida","city":"Green Bay","state":"WI"},{"name":"Never on Sunday","slug":"0-Never on Sunday","day":0,"time":"09:30","location":"The Bridge","notes":"","locationNotes":"","updated":"2019-05-11 12:13:33","types":["c"],"address":"2514 Jenny Lane","city":"Green Bay","state":"WI"},{"name":"","slug":"0-EspanolaWillebrord","day":0,"time":"10:00","location":"St. Willebrord Church","n
// ternary operator
public static string Speak(string name="") => $"One for {(name=="" ? "you" : name)}, one for me.";}
// default value for optional argument
public static string Speak(string name="you") => string.Format("One for {0}, one for me.", name);
// null-coalescing assignment operator
public static string Speak(string name = null) => $"One for { name ?? "you"}, one for me.";
@idusortus
idusortus / repo-reset.md
Created January 21, 2020 23:23 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@idusortus
idusortus / net-csharp-sendgrid-inline-email-images.md
Last active April 7, 2021 02:14
Generate SendGrid Emails with Inline Images using C# .NET Core 3.1 ( Console )

Not optimized, or clean, but gets the point across. Getting inline images to show in the email was obnoxious. Key solution points are provided.

Backing Method

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Net;
@idusortus
idusortus / csharp-reflection-compare-two-objects-replace-nulls.md
Last active April 9, 2021 12:52
C# .Net Core 3.1 - Compare Two Objects, Replace Nulls

Example:

var cem = new TemplateEmailModel
{
    To = "idusortus@gmail.com",
    Subject = "SES Test"                              
};

var testCem = new TemplateEmailModel
{
@idusortus
idusortus / csharp-expressions-statements.md
Last active April 9, 2021 14:25
C# - Expressions vs. Statements

Statements

From Microsoft:
The actions that a program takes are expressed in statements.

  • Do not return a value
  • Cannot be chained
  • May contain expressions
  • Generally cannot be used as expressions

Expressions