Skip to content

Instantly share code, notes, and snippets.

View pedropalhari's full-sized avatar

Pedro Palhari pedropalhari

View GitHub Profile
@pedropalhari
pedropalhari / mod.js
Created January 5, 2021 15:14
Streaming and static video serving with Deno & Oak
import {
Application,
Router,
send,
} from "https://deno.land/x/oak@v6.3.2/mod.ts";
const app = new Application();
const router = new Router();
@pedropalhari
pedropalhari / gist:a2d7d046207a5f059c1bd4e1eb4735fe
Last active September 9, 2022 20:35 — forked from mkocikowski/gist:aeca878d58d313e902bb
Setting up Redis to run as a daemon under systemd

This can be used to daemonize anything that would normally run in the foreground; I picked Redis. Put this in /etc/systemd/system/redis.service:

[Unit]
Description=Redis
After=syslog.target

[Service]
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
RestartSec=5s