Skip to content

Instantly share code, notes, and snippets.

View shivanshtalwar0's full-sized avatar
💭
Building Januscaler

Shivansh Talwar shivanshtalwar0

💭
Building Januscaler
View GitHub Profile
@shivanshtalwar0
shivanshtalwar0 / async_image_vuejs_directive.md
Created April 6, 2023 10:38
Asynchronously load image through Promise in vue js with directive

Create Global Directive

const vueApp=createApp({})
const replaceElementChildrenWithImage = async (el, binding ) => {
    try {
      const image = await binding.value;
      if (image) el.replaceChildren(image);
    } catch (err) {
      console.error("Image can't be resolved seems like url is broken",err);
    }
@danielwetan
danielwetan / nodejs-cicd-github-actions.md
Last active July 23, 2025 23:32
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

@shivanshtalwar0
shivanshtalwar0 / iptable-port-forwarding-vpn.md
Last active January 12, 2025 10:21
IpTables based port forwarding make sure to disable ufw or set rule to make it work

make pupeteer work on arm64 (raspberry pi or orangepi)

  1. Install deps
sudo apt install chromium-browser chromium-codecs-ffmpeg

and specify flags and path

const browser = await puppeteer.launch({
          headless: true,
 executablePath: '/usr/bin/chromium-browser',