Skip to content

Instantly share code, notes, and snippets.

View idusortus's full-sized avatar

Sam Johnson idusortus

  • FS-Consulting
  • Green Bay, WI
  • 07:11 (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 / 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

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@idusortus
idusortus / MinimalAPIs.md
Created January 23, 2024 16:05 — forked from davidfowl/MinimalAPIs.md
Minimal APIs at a glance
@idusortus
idusortus / Result.cs
Created January 30, 2024 13:33 — forked from m-jovanovic/Result.cs
Result type
public class Result
{
protected internal Result(bool isSuccess, Error error)
{
if (isSuccess && error != Error.None)
{
throw new InvalidOperationException();
}
if (!isSuccess && error == Error.None)