Skip to content

Instantly share code, notes, and snippets.

@paulwongx
paulwongx / seo-tools.md
Created December 3, 2023 17:45
SEO Tools
  • Ahrefs SEO Toolbar
  • Keywords Everywhere
  • Meta SEO Inspector
  • Mozbar
  • NinjaOutreach Lite
  • Redirect Path
  • SEO Minion
  • SEOquake
  • Similarweb
  • Ubersuggest
@paulwongx
paulwongx / js-cheatsheet.md
Created December 1, 2023 19:38
Javascript Cheatsheet

Javascript Cheatsheet

  1. This document focuses on more nuanced topics. It is not comprehensive.
  2. Examples are taken from MDN mostly

Strings

// [@@iterator]() - iterating a string
const str = 'A\uD835\uDC68';
const strIter = str[Symbol.iterator]();
@paulwongx
paulwongx / url_shortener.md
Created December 1, 2023 18:46
System Design Notes

URL SHORTENER

Youtube URL: https://www.youtube.com/watch?v=JQDHz72OA3c

How to design a url shortener

Ask questions to clarify uncertainties

  1. What is the length of the URL which is shortener
  2. What is the volume of the traffic
  3. Should this be a single system or scalable
@paulwongx
paulwongx / index.html
Created November 30, 2023 16:57
Object Detection
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Camera</title>
<!-- Load TensorFlow.js. This is required to use coco-ssd model. -->
<script defer src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"> </script>
<!-- Load the coco-ssd model. -->
@paulwongx
paulwongx / cql_example.md
Last active November 18, 2023 18:56
CQL Example
-- CQLSH

-- creating keyspace
CREATE KEYSPACE dev_db WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = 'true';

-- consistency
CONSISTENCY; -- Current consistency level is LOCAL_QUORUM.
CONSISTENCY ONE; -- OK for one node
CONSISTENCY QUORUM; -- Best for multiple nodes at high replication factor of ~3
@paulwongx
paulwongx / object-oriented-programing.md
Created October 18, 2023 18:02
Object Oriented Programming (OOP) Notes

Object Oriented Programming

SOLID Principles

  • Single Responsibility Principle (SRP)
  • Open/Closed Principle (OCP)
  • Liskov Substitution Principle (LSP)
  • Interface Segregation Principle (ISP)
  • Dependency Inversion Principle (DIP)
@paulwongx
paulwongx / deploy.yaml
Created September 23, 2023 01:58
Github Actions Workflows
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
@paulwongx
paulwongx / git-commands.md
Last active December 1, 2023 18:45
Git Commands

Git Commands

# Checking out a new branch
git checkout -b <branch-name>
git checkout -b feature/my-feature

# Commiting a branch
git add .
git commit -m "Your commit message here"
git push origin <branch-name>
@paulwongx
paulwongx / dashboard_sidebar.html
Created September 1, 2023 20:48
Tailwind Gists
<div class="flex h-screen w-full flex-col bg-green-50">
<div class="h-[72px] w-full bg-green-100">Header</div>
<div id="body" class="flex flex-row">
<div id="sidebar" class="flex-0 scrollbar h-[calc(100vh-72px)] w-64 bg-green-200 flex flex-col">
<div id="top-sidebar" class="flex flex-col bg-red-50">
<div>Menu 1</div>
<div>Menu 2</div>
<div>Menu 3</div>
</div>
@paulwongx
paulwongx / s3_bucket_policy.json
Last active June 23, 2023 21:08
s3 Bucket Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:GetObjectAcl",
"s3:GetObject",
"s3:DeleteObject",