Skip to content

Instantly share code, notes, and snippets.

View onepiecehung's full-sized avatar
😂
I don't feel so good

Hung Nguyen onepiecehung

😂
I don't feel so good
View GitHub Profile
@onepiecehung
onepiecehung / cloudSettings
Last active July 11, 2020 14:37 — forked from dixyes/hls.html
Live Danmaku using Dplayer mqttjs mosca msgpack-lite
{"lastUpload":"2020-07-11T14:37:51.790Z","extensionVersion":"v3.4.3"}
@onepiecehung
onepiecehung / delete-aws-s3.js
Created December 3, 2020 06:36 — forked from jeonghwan-kim/delete-aws-s3.js
delete object in S3
var aws = require('aws-sdk');
var BUCKET = 'node-sdk-sample-7271';
aws.config.loadFromPath(require('path').join(__dirname, './aws-config.json'));
var s3 = new aws.S3();
var params = {
Bucket: 'node-sdk-sample-7271',
Delete: { // required
Objects: [ // required
{
const puppeteer = require('puppeteer');
class Webpage {
static async generatePDF(url) {
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode.
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle', networkIdleTimeout: 5000 }); // Adjust network idle as required.
const pdfConfig = {
path: 'url.pdf', // Saves pdf to disk.
format: 'A4',
const puppeteer = require('puppeteer');
const nodemailer = require('nodemailer');
class Webpage {
static async generatePDF(url) {
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode.
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle', networkIdleTimeout: 5000 }); // Adjust network idle as required.
const pdfConfig = {
format: 'A4',
@onepiecehung
onepiecehung / nodejs-cicd-github-actions.md
Created October 13, 2022 05:49 — forked from danielwetan/nodejs-cicd-github-actions.md
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder