Skip to content

Instantly share code, notes, and snippets.

View motdde's full-sized avatar
🤿
Experementing

Oluwaseun Oyebade motdde

🤿
Experementing
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active April 30, 2024 04:47
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
# Source: https://gist.github.com/48f44d3974db698d3127f52b6e7cd0d3
###########################################################
# Automation of Everything #
# How To Combine Argo Events, Workflows, CD, and Rollouts #
# https://youtu.be/XNXJtxkUKeY #
###########################################################
# Requirements:
# - k8s v1.19+ cluster with nginx Ingress
# Source: https://gist.github.com/764b402c8979678dfde01fd8f63c22e2
###########################################################
# Kustomize vs Helm #
# The Fight Between Templating and Patching in Kubernetes #
# https://youtu.be/ZMFYSm0ldQ0 #
###########################################################
# Links to referenced videos:
# - https://youtu.be/sUPkGChvD54
# Source: https://gist.github.com/07b0b4642b5694d0239ee7c1629173ce
#######################################################
# Kustomize #
# How to simplify Kubernetes configuration management #
# https://youtu.be/Twtbg6LFnAg #
#######################################################
#########
# Setup #
@RuolinZheng08
RuolinZheng08 / backtracking_template.py
Last active March 28, 2024 18:48
[Algo] Backtracking Template & N-Queens Solution
def is_valid_state(state):
# check if it is a valid solution
return True
def get_candidates(state):
return []
def search(state, solutions):
if is_valid_state(state):
solutions.append(state.copy())
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active April 29, 2024 03:38
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@stepney141
stepney141 / BookmarkAPI_en.md
Last active April 4, 2023 01:45
(DEPRECATED) Twitter Undocumented Endpoints for Bookmark
@singh1114
singh1114 / param_middleware.js
Last active January 25, 2021 20:11
Node.js middleware article
const validateParams = function (requestParams) {
return function (req, res, next) {
for (let param of requestParams) {
if (checkParamPresent(Object.keys(req.body), param)) {
let reqParam = req.body[param.param_key];
if (!checkParamType(reqParam, param)) {
return res.send(400, {
status: 400,
result: `${param.param_key} is of type ` +
`${typeof reqParam} but should be ${param.type}`
@qoomon
qoomon / conventional_commit_messages.md
Last active April 30, 2024 08:03
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

-- Window Function examples
-- PostgreSQL conference South Africa 2018
-- By Willem Booysen
-- Youtube: https://www.youtube.com/watch?v=blHEnrYwySE
-- Create database and templates for demo
DROP DATABASE IF EXISTS WindowFunctions;
CREATE DATABASE WindowFunctions;