Skip to content

Instantly share code, notes, and snippets.

@mikeon
mikeon / The Technical Interview Cheat Sheet.md
Created November 6, 2021 15:58 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@mikeon
mikeon / System Design.md
Created May 5, 2021 18:24 — forked from om-ganesh/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@mikeon
mikeon / blazor-auth.md
Created April 18, 2021 11:41 — forked from SteveSandersonMS/blazor-auth.md
Blazor authentication and authorization

Authentication and Authorization

Authentication means determining who a particular user is. Authorization means applying rules about what they can do. Blazor contains features for handling both aspects of this.

It worth remembering how the overall goals differ between server-side Blazor and client-side Blazor:

  • Server-side Blazor applications run on the server. As such, correctly-implemented authorization checks are both how you determine which UI options to show (e.g., which menu entries are available to a certain user) and where you actually enforce access rules.
  • Client-side Blazor applications run on the client. As such, authorization is only used as a way of determining what UI options to show (e.g., which menu entries). The actual enforcement of authorization rules must be implemented on whatever backend server your application operates on, since any client-side checks can be modified or bypassed.

Authentication-enabled templates for Server-Side Blazor

@mikeon
mikeon / gist:f19ddb5e87c47779d3c0434d3573c3ea
Created March 30, 2021 12:06 — forked from CrookedNumber/gist:8964442
git: Removing the last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

{"lastUpload":"2021-03-28T14:23:54.438Z","extensionVersion":"v3.4.3"}
http://localhost:12002/AtlasDataService/Patient()?$filter=Id%20eq%201000000000%20or%20Id%20eq%201000000001%20or%20Id%20eq%201000000002%20or%20Id%20eq%201000000003%20or%20Id%20eq%201000000004%20or%20Id%20eq%201000000005%20or%20Id%20eq%201000000006%20or%20Id%20eq%201000000007%20or%20Id%20eq%201000000008%20or%20Id%20eq%201000000009%20or%20Id%20eq%201000000010%20or%20Id%20eq%201000000011%20or%20Id%20eq%201000000012%20or%20Id%20eq%201000000013%20or%20Id%20eq%201000000014%20or%20Id%20eq%201000000015%20or%20Id%20eq%201000000016%20or%20Id%20eq%201000000017%20or%20Id%20eq%201000000018%20or%20Id%20eq%201000000019%20or%20Id%20eq%201000000020%20or%20Id%20eq%201000000021%20or%20Id%20eq%201000000022%20or%20Id%20eq%201000000023%20or%20Id%20eq%201000000024%20or%20Id%20eq%201000000025%20or%20Id%20eq%201000000026%20or%20Id%20eq%201000000027%20or%20Id%20eq%201000000028%20or%20Id%20eq%201000000029%20or%20Id%20eq%201000000030%20or%20Id%20eq%201000000031%20or%20Id%20eq%201000000032%20or%20Id%20eq%201000000033%20or%20Id%20eq%201000
@mikeon
mikeon / gist:5fc783d1823027093b2474d13e282771
Created August 2, 2017 14:39 — forked from SzymonPobiega/gist:5220595
DDD/CQRS/ES/Architecture videos

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht
var HelloWorldApp = HelloWorldApp || {};
HelloWorldApp.namespace = function (nameSpaceAsString) {
var parts = nameSpaceAsString.split('.'),
parent = HelloWorldApp,
i;
if (parts[0] === "HelloWorldApp") {
parts = parts.slice(1);
}
// The module pattern
var sampleModule = (function() {
var privateSomething = "priv";
var publicSomethng = "public";
var changePrivateVariable = function() {
privateSomething = "priv changed";
}