This script will watch for xscreensaver blanking event and disable actual HDMI output accordingly.
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
# | |
# A quick tip on how to set up rotating logging handler with | |
# automatic gzipping of rotated files. Tested on python 3.7 | |
# | |
# | |
# Testing tip: | |
# python gziplogging.py | |
# touch example.log --date='2005/01/01' | |
# python gziplogging.py | |
# ls -lah *.log* |
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
#!/usr/bin/env bash | |
# Creates local version tags based on cookbook metadata.rb change history | |
# Usage: bash tagify-cookbook [cookbook_name] | |
cookbook=${1:-some_cookbook} | |
git log --pretty=format:"%h" cookbooks/$cookbook/metadata.rb | while read ref; do | |
tag="$cookbook-$(git show $ref:cookbooks/$cookbook/metadata.rb | grep "^version '" | sed -E "s/.* '(.*)'/\1/g" )" | |
echo "ref: $ref -> $tag"; |
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
{ stdenv, fetchurl, patchelf, makeWrapper, xorg, gcc, gcc-unwrapped, freetype, fontconfig, liberation_ttf }: | |
stdenv.mkDerivation rec { | |
name = "IPMIView-${version}"; | |
version = "2.16.0"; | |
buildVersion = "190528"; | |
src = fetchurl { | |
url = "https://www.supermicro.com/wftp/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz"; | |
sha256 = "0pz4q8vsnv6wqpiy6am333c2cgsdjmxc6w9vm4hi8qyaavfbq0w2"; |
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
# Reference: | |
# https://janus.conf.meetecho.com/docs/rest.html | |
# https://janus.conf.meetecho.com/docs/streaming.html | |
import requests | |
import json | |
import pprint | |
import random | |
import string |
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
{ | |
# [...] | |
# Assuming failover IP being 1.2.3.4 and host primary IP being 5.6.7.8 | |
networking.interfaces.ens3.ipv4.addresses = [ { | |
address = "1.2.3.4"; | |
prefixLength = 32; | |
} ]; | |
networking.interfaces.ens3.ipv4.routes = [ { | |
address = "5.6.7.254"; |
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
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> | |
<!-- ... --> | |
<qemu:commandline> | |
<qemu:arg value='-acpitable'/> | |
<qemu:arg value='file=/some/path/slic.bin'/> | |
<qemu:arg value='-acpitable'/> | |
<qemu:arg value='file=/some/path/msdm.bin'/> | |
<qemu:arg value='-smbios'/> | |
<qemu:arg value='file=/some/path/smbios_type_0.bin'/> | |
<qemu:arg value='-smbios'/> |
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 | |
set -e | |
# Set route_localnet = 1 on all interfaces so that ssl can use "localhost" as | |
# destination | |
sysctl -w net.ipv4.conf.default.route_localnet=1 | |
sysctl -w net.ipv4.conf.all.route_localnet=1 | |
# DROP martian packets as they would have been if route_localnet was zero |
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
<template> | |
<video controls></video> | |
</template> | |
<script> | |
/* Note: you may need to add `externals: { ws: "WebSocket"},` to Your webpack configuration for this to work properly */ | |
import { Janus, StreamingJanusPlugin } from '@techteamer/janus-api' | |
export default { | |
props: ['config', 'stream'], |
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
#!/usr/bin/env bash | |
set -e | |
panic() { echo $* >&2; exit 1; } | |
HOST="$(hostname)" | |
CLIENT="$1" | |
[ -z "$CLIENT" ] && panic "usage: ./bundle-conf [CLIENT]" |