Skip to content

Instantly share code, notes, and snippets.

@munkiwarra
munkiwarra / sh
Last active February 5, 2022 07:54
Set redshift temperature and brightness
#!/bin/bash
temperatureFilePath=~/.config/redshift/TEMPERATURE
brightnessFilePath=~/.config/redshift/BRIGHTNESS
TEMPERATURE=$(cat ${temperatureFilePath})
BRIGHTNESS=$(cat ${brightnessFilePath})
MAX_TEMPERATURE=4000
MIN_BRIGHTNESS=0.5
@munkiwarra
munkiwarra / js
Created January 9, 2025 08:58
esbuild restart express
import childProcess from "child_process";
let serverProcess;
const startServer = () => {
serverProcess = childProcess.spawn("node", ["app.js"], {
stdio: "inherit",
});
};
const startPlugin = (hasWatch = true) => {