Skip to content

Instantly share code, notes, and snippets.

@CommonLoon102
CommonLoon102 / lsof.sh
Created April 30, 2024 23:14
list connections with processes
lsof -i4 -i6 +c 15 | grep '(ESTABLISHED)' | tail -n +2 | awk '{ split($9, a, "->"); print $2, $1, $8, a[2] }' | awk '{ printf "%-5s %-15s %-3s %s\n", $1, $2, $3, $4 }'
@CommonLoon102
CommonLoon102 / main.js
Created January 11, 2023 07:41
To reproduce 28714
// Modules to control application life and create native browser window
const { app, BrowserWindow } = require('electron')
const path = require('path')
function createWindow() {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {