Skip to content

Instantly share code, notes, and snippets.

View zefanjajobse's full-sized avatar

iiTzArcur zefanjajobse

View GitHub Profile
@zefanjajobse
zefanjajobse / webpack-old-browsers.md
Created June 3, 2025 09:04
Support older browsers for both the code as the used node_modules of a react-typescript project

.browserlistrc:

# Browsers that we support

# Configure how you require

# https://github.com/browserslist/browserslist

defaults
chrome >= 48
@zefanjajobse
zefanjajobse / index.html
Created April 18, 2025 20:35
Use browser SpeechRecognition to send closed captions to youtube livestream
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="text/javascript" src="https://livejs.com/live.js"></script>
</head>

𝗙𝗮𝘀𝘁𝗲𝗿 𝗗𝗼𝗰𝗸 𝗛𝗶𝗱𝗶𝗻𝗴: defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock

𝗙𝗮𝘀𝘁𝗲𝗿 𝗗𝗼𝗰𝗸 𝗛𝗶𝗱𝗶𝗻𝗴 𝗨𝗻𝗱𝗼: defaults write com.apple.dock autohide-delay -float 0.5; defaults write com.apple.dock autohide-time-modifier -int 0.5 ;killall Dock

𝗗𝗶𝘀𝗮𝗯𝗹𝗲 𝗔𝗻𝗻𝗼𝘆𝗶𝗻𝗴 𝗗𝗶𝘀𝗸 𝗪𝗮𝗿𝗻𝗶𝗻𝗴 (must restart Mac to take effect): sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.DiskArbitration.diskarbitrationd.plist DADisableEjectNotification -bool YES && sudo pkill diskarbitrationd

𝗥𝗲-𝗘𝗻𝗮𝗯𝗹𝗲 𝗔𝗻𝗻𝗼𝘆𝗶𝗻𝗴 𝗗𝗶𝘀𝗸 𝗪𝗮𝗿𝗻𝗶𝗻𝗴: sudo defaults delete /Library/Preferences/SystemConfiguration/com.apple.DiskArbitration.diskarbitrationd.plist DADisableEjectNotification && sudo pkill diskarbitrationd

@zefanjajobse
zefanjajobse / launch.json
Last active April 30, 2025 15:23
Vite F5 debug for both chrome and firefox with autostart/stop of devserver
{
"version": "0.2.0",
"configurations": [
{
"name": "localhost (Chrome)",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/dist",
},
@zefanjajobse
zefanjajobse / launch.json
Last active April 30, 2025 15:28
Nextjs F5 debug for both chrome and firefox with autostart/stop of devserver
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{
@zefanjajobse
zefanjajobse / IISnode_dev_server.md
Last active April 30, 2025 15:29
Use IISnode for webpack, nextjs or vite dev server

IIS is a way to setup web servers on windows. mostly used when you want to run asp.net with a a domain name instead of a random port. IISNode can be used to run node.js within IIS, so the frontend can have a domain name as well while testing. which can also be frameworks like webpack, vite and next-js. with on-filechange re-rendering. For other languages, like go and python, the httpplatformhandler is recommended. Which can be downloaded here.

For iisnode to work you need to enable the Application Development Features within IIS: Pasted image 20250407204729

The IIS-site can automatically be created or updated via PowerShell,

@zefanjajobse
zefanjajobse / docker-compose.yml
Last active April 7, 2025 20:45
docker_compose file previously used for bfban
services:
bfban:
image: ghcr.io/bfban/bfban-website/bfbanv2-backend:latest
restart: always
ports:
- target: 4002
published: 4002
protocol: tcp
mode: host
volumes: