Skip to content

Instantly share code, notes, and snippets.

View mdzzaman's full-sized avatar

Md. Kamruzzaman mdzzaman

  • 101010
View GitHub Profile
@balvinder294
balvinder294 / oauth-popup.ts
Last active March 22, 2023 10:19
Popup window for Oauth Login
// authorization code and tokens
authorizationCode: string;
oAuthToken: string;
oAuthVerifier: string;
// popup related
private windowHandle: Window; // reference to the window object we will create
private intervalId: any = null; // For setting interval time between we check for authorization code or token
private loopCount = 600; // the count until which the check will be done, or after window be closed automatically.
private intervalLength = 100; // the gap in which the check will be done for code.
@a3dho3yn
a3dho3yn / mongodb_c#_cheatsheet.md
Last active March 10, 2025 21:41
MongoDB C# Driver Cheat Sheet

MongoDB C# Driver Cheat Sheet

(C) 2015 by Derek Hunziker, (C) 2017 by AppsOn

As of releasing MongoDB 3.4 and C# Driver v2.4, original cheatsheet by Derek is outdated. In addition, it has some deficiencies like connecting to MongoDB, creating indexes, etc. This updated version works fine with C# Driver v2.4.7 and MongoDB v3.4.

Setup

Define Document Models

Note: Defined models and collections will be used in entire cheatsheet.

@wojteklu
wojteklu / clean_code.md
Last active October 20, 2025 14:57
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules