Skip to content

Instantly share code, notes, and snippets.

View GarrickBee's full-sized avatar
🎯
Focusing

Garrick Ng GarrickBee

🎯
Focusing
View GitHub Profile
@GarrickBee
GarrickBee / wave-lambda.handler.ts
Created October 21, 2022 09:56
Simple lambda function to read from PDF statement and update to wave
export async function updateMbbStatementToWave(event) {
// Get pdf file
const mbbPdfBuffer = fs.readFileSync("data/april-jun-2022.pdf");
// Get transaction list
const mbbTransactionList =
await MBBPdfModule.convertMbbPdfBufferToTransactionList(mbbPdfBuffer);
const report: {
total: number;
@GarrickBee
GarrickBee / simple-wave.module.ts
Last active November 23, 2022 16:36
Example of Creating Transaction to WaveApp
import {
WAVE_BALANCE_TYPE,
WAVE_ACCOUNT_ID,
WAVE_TRANSACTION_DIRECTION,
} from "@src/type/account.type";
import axios, { AxiosRequestConfig } from "axios";
import dayjs from "dayjs";
async function wavePost(data?: any, config?: AxiosRequestConfig) {
return await axios.post("https://gql.waveapps.com/graphql/public", data, {
@GarrickBee
GarrickBee / build-stage.yaml
Last active December 2, 2022 16:29
GitLab Pages With React Router For Free
build:
image: node:14.15.3-buster-slim
stage: build
script:
- yarn install
- yarn build
artifacts:
paths:
- build/
@GarrickBee
GarrickBee / node_nginx_ssl.md
Created May 11, 2020 10:41 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user