Skip to content

Instantly share code, notes, and snippets.

@jsuryahyd
jsuryahyd / Readme.md
Created September 16, 2021 15:40
Nginx config for SPA

Serve with nginx (no pm2)

server{
   listen 443 ssl;
   server_name surya.in;

   ssl_certificate /etc/nginx/sslcerts/surya.in.crt;
   ssl_certificate_key /etc/nginx/sslcerts/surya.in.rsa;

   root /var/www/my-react-app/build;
@jsuryahyd
jsuryahyd / logger.js
Last active February 14, 2022 08:56
Logging in nodejs
//log
const log4js = require("log4js");
const path = require("path");
log4js.configure({
appenders: {
info: {
type: "dateFile",
filename: path.join(__dirname, "../logs", "info.log")
},
errors: {
@jsuryahyd
jsuryahyd / steps.md
Last active August 8, 2022 04:41
Set Extenal Microphone as default on Startup in Linux
  • Make sure PulseAudio is installed
  • Search for "Startup applications" in applications (click on windows menu and search)
  • click Add item
  • In Command input - pactl set-default-source 'alsa_input.usb-0c76_USB_PnP_Audio_Device-00.mono-fallback' [refer below for how to get the name of the mic]
  • Click save
  • It should run automatically from next startup
@jsuryahyd
jsuryahyd / commands.sh
Created September 28, 2023 10:41
disable zscaler on mac
# https://www.atpeaz.com/disable-zscaler-temporarily-on-your-mac/
# disable
sudo launchctl unload /Library/LaunchDaemons/com.zscaler.service.plist && sudo launchctl unload /Library/LaunchDaemons/com.zscaler.tunnel.plist
# Reenable
sudo launchctl load /Library/LaunchDaemons/com.zscaler.service.plist && sudo launchctl load /Library/LaunchDaemons/com.zscaler.tunnel.plist