Skip to content

Instantly share code, notes, and snippets.

View adafycheng's full-sized avatar

Ada Cheng adafycheng

View GitHub Profile
@adafycheng
adafycheng / README.md
Last active January 19, 2024 10:04
CLI Tool

CLI Tool

This is a gist aiming at providing a CLI Tool written in Node.jsnpx

How to run it?

npx https://gist.github.com/adafycheng/314fc85d66356d4e985c02b378178aec
@adafycheng
adafycheng / nom_notes.md
Created April 27, 2022 20:51
NPM Notes

NPM Notes

  1. List dependency tree.

npm list --depth=[depth]

@adafycheng
adafycheng / kafka_notes.md
Last active April 26, 2022 17:16
Kafka Notes

Kafka Notes

Concepts

Producing data to Kafka

acks = 0 (No acknowledgement) => High throughput, no delivery guaranteed acks = 1 (Leader) acks = 2 (Leaders and followers) => Delivery guaranteed, but low throughput

@adafycheng
adafycheng / confluent_quick_start_kubenetes.md
Last active November 3, 2022 13:52
Confluent Quick Start Notes
@adafycheng
adafycheng / google_cloud_cheatsheet.md
Last active January 10, 2022 00:28
Google Cloud Console Cheatsheet

List out the commands used for performing various tasks in Google Cloud Console.

Authentication

  1. List credentialed accounts

    gcloud auth list

  2. If the desired account is not set, set an existing account to be the current active account.

@adafycheng
adafycheng / contact_form.html
Created December 11, 2021 23:22
Contact form
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<style>
body {
background-color: #000;
color: #fff;
}
.btn {
@adafycheng
adafycheng / contact_form_server.js
Last active December 12, 2021 00:06
Node.js program to send email via Gmail SMTP server
var express = require('express');
var cors = require('cors')
var nodemailer = require('nodemailer');
/*
* Configurations
*/
const allowedOrigin = ["https://adafycheng.github.io","http://localhost:5000"];
const emailUser = 'testing@gmail.com';
const password = 'hdkshfeioslcuwlc';
@adafycheng
adafycheng / mongo_db_notes.md
Last active December 7, 2021 23:33
This article documents how Mongo DB CLI tool can be used to manipulate data.

MongoDB Notes

MongoDB provides several ways to manipulate data:

  • mongo / mongosh: CLI
  • Compass: GUI

This document focuses on the usage of CLI.

1. MongoDB Installation (Mac OS)