From Bas van Dijk:
To understand these things I would recommend using nix-repl:
$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.
#Requires AutoHotkey v2 | |
; Install the keyboard hook to capture the real key state of the keyboard | |
InstallKeybdHook(true) | |
; Disable the CapsLock key | |
SetCapsLockState("alwaysoff") | |
; Send esc key when Capslock is pressed as default | |
g_DoNotAbortSendEsc := true | |
$*Capslock::{ ; Capture CapsLock key press | |
global g_DoNotAbortSendEsc ; use global variable g_DoNotAbortSendEsc |
// ==UserScript== | |
// @name Dark NixOS Package, Wiki and Main Site | |
// @namespace http://userstyles.org | |
// @description Darkened NixOS Websites, includes Wiki and Package Search | |
// @author Thomas Leon Highbaugh | |
// @homepage https://userstyles.org/styles/163453 | |
// @match http://nixos.org/* | |
// @match https://nixos.org/* | |
// @match http://*.nixos.org/* | |
// @match https://*.nixos.org/* |
import { Browser, chromium, firefox, webkit } from "playwright"; | |
import { afterAll, beforeAll, describe, it } from "vitest"; | |
const browserTypes = process.env.ALL_BROWSERS | |
? [chromium, firefox, webkit] | |
: [chromium]; | |
for (const browserType of browserTypes) { | |
describe(`browser:${browserType.name()}`, () => { | |
let browser: Browser; |
# https://www.freedesktop.org/software/systemd/man/systemd.unit.html | |
[Unit] | |
Description=My App | |
After=network.target | |
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html | |
[Service] | |
Type=simple | |
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#WorkingDirectory= | |
WorkingDirectory=-/srv/app/ |
#!/usr/bin/env bash | |
START_TIME=$SECONDS | |
set -e | |
echo "-----START GENERATING HLS STREAM-----" | |
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME] | |
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
# comment/add lines here to control which renditions would be created | |
renditions=( |
<!DOCTYPE html> | |
<html lang='`en'> | |
<head> | |
<meta charset='utf-8'/> | |
<title>Audio only stream example</title> | |
<script src="//cdn.jsdelivr.net/npm/hls.js@latest"></script> | |
<style> | |
video { | |
width: 640px; | |
height: 360px; |
import * as admin from 'firebase-admin' | |
import * as fft from 'firebase-functions-test' | |
const ft = fft() | |
import * as sinon from 'sinon' | |
import { makeUppercase, addMessage } from './function' | |
describe('order', () => { | |
describe('makeUpperCase', () => { | |
it('should upper case input and write it to /uppercase', async () => { | |
const fakeSnaphost = ft.firestore.makeDocumentSnapshot({ |
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect | |
# Forked from [email protected] - http://jeroen.massar.ch | |
# Preparation: you need to install and configure fcgiwrap and set it to listen at fcgiwrap.socket. | |
# An example tutorial: https://www.howtoforge.com/serving-cgi-scripts-with-nginx-on-centos-6.0-p2 | |
# A useful hint: add -f as a parameter to fcgiwrap to redirect the cgi errors to your nginx error log. | |
server { | |
listen 80; | |
server_name git.example.com; | |