Skip to content

Instantly share code, notes, and snippets.

@mikeon
mikeon / download-website.sh
Created May 18, 2025 13:29 — forked from pete-otaqui/download-website.sh
download a website for offline browsing with wget
#!/bin/bash
wget -E -k -r -p -e robots=off https://some-site.com/docs/
#### Note the following arguments:
# -E : converts downloaded HTML filenames to have a ".html" suffix
# -k : converts internal links within downloaded files to point to other downloaded files
# -r : recursively download by scanning for internal links in pages
# -p : download "page requisites", i.e. images, styles, scripts
# -e robots=off : ignore robots.txt (because some sites use it to avoid indexing)
@mikeon
mikeon / claude_3.5_sonnet_artifacts.xml
Created July 17, 2024 09:17 — forked from dedlim/claude_3.5_sonnet_artifacts.xml
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@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);
}