- Model: Linksys EA8100
- Memory: 256MB
- Storage: Using 16GB thumb drive as extroot
- OpenWrt Version: OpenWrt 23.05.3 r23809-234f1a2efa / LuCI openwrt-23.05 branch git-24.073.29889-cd7e519
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function slowmo(rate = 10) { | |
window._raf = window.requestAnimationFrame | |
window.requestAnimationFrame = f => window._raf(t => f(t/rate)) | |
Date._now = Date.now | |
Date.now = () => Date._now() / rate | |
performance._now = performance.now | |
performance.now = () => performance._now()/rate | |
} | |
slowmo() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// Replace React.lazy(() => import('x')); | |
// with retryDynamicImport(() => import('x')); | |
import { ComponentType, lazy } from 'react'; | |
const MAX_RETRY_COUNT = 15; | |
const RETRY_DELAY_MS = 500; | |
// Regex to extract the module URL from the import statement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>My Angular from Scratch</title> | |
<style> | |
.my-component { | |
font-family: Arial, sans-serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VIDEOS=$(ls *.mp4) | |
for VIDEO in $VIDEOS | |
do | |
ffmpeg -i $VIDEO -vcodec libx265 -crf 28 -f mp4 ${VIDEO%%.*}_compressed.mp4 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irping() { | |
ip=$1 | |
nodes=("ir1" "ir3" "ir5" "ir6") | |
for node in "${nodes[@]}"; do | |
# Make the API request and store the response | |
response=$(curl -s -H "Accept: application/json" "https://check-host.net/check-ping?host=${ip}&node=ir1.node.check-host.net&node=ir3.node.check-host.net&node=ir5.node.check-host.net&node=ir6.node.check-host.net") | |
# Check for "limit_exceeded" error in the response | |
error_message=$(echo "$response" | jq -r '.error') | |
if [ "$error_message" == "limit_exceeded" ]; then |