Skip to content

Instantly share code, notes, and snippets.

marxangels / express-hot-reload.js
Last active September 10, 2023 03:59
A simple module-level hot-reload for my express web application with less than 200 lines of code.
View express-hot-reload.js
import fs from 'fs'
import vm from 'vm'
import path from 'path'
* cli command
* node --experimental-vm-modules express-hot-reload.js
const ModuleCache = new Map()
marxangels / pool.go
Created March 28, 2020 16:28
[Go] time.Timer + sync.Pool
View pool.go
package foo
import (
var timerPool sync.Pool
func PoolTimerGet(d time.Duration) *time.Timer {
marxangels / ics-reset.ps1
Last active October 23, 2019 01:11
How to fix ICS (Windows Internet Connection Sharing) not working after reboot? Just reset ICS manually, or do it by PowerShell.
View ics-reset.ps1
# Reset Windows Internet Connection Sharing by PowerShell.
# PowerShell.exe -ExecutionPolicy Bypass C:\Path\to\ics-reset.ps1
$module = New-Object -ComObject HNetCfg.HNetShare
$list = New-Object System.Collections.Generic.List[System.Object]