sudo zypper install yubikey-manager pam_u2f
ykman info
ykman fido info
# Generate the u2f keys/config
pamu2fcfg -u $(whoami) -opam://$HOSTNAME -ipam://$HOSTNAME > ~/u2f_keysThe NGINX Unit control API includes a /status endpoint for usage statistics. This is a solution for exposing these metrics in Prometheus format.
The application (run by Unit) queries the /status URI on the control socket and converts the JSON response into Prometheus text format. PHP and Python implementations are available.
These instructions assume an existing Unit installation with a working configuration. We will add a new listener on the default prometheus port (9090) and route it directly to the Prometheus app.
Step 0. Install the preferred Unit language module (unit-php or unit-python)
| import json | |
| import boto3 | |
| import requests | |
| from datetime import datetime, timedelta | |
| CLIENT = boto3.client('ce') | |
| SLACK_WEBHOOK_URL = '' # Enter the slack webhook url. | |
| def lambda_handler(event, context): |
| #!/bin/bash | |
| set -eu | |
| NAMESPACE=$1 | |
| PVCNAME=$2 | |
| TARGETZONE=$3 | |
| # SNAPSHOTID is optional, if you did a snapshot already, you can pass it | |
| SNAPSHOTID=${4:-} |
Original guide with a standard build is here.
With this guide, I'm adding more instructions to enable support for NVIDIA CUVID and NVIDIA NPP for enhanced encode and decode performance.
First, prepare for the build and create the work space directory:
cd ~/
| # Edit your fish prompt with `funced fish_prompt` and | |
| # add the following to a desired place in the function. | |
| # Save the prompt after editing with `funcsave fish_prompt`. | |
| # Set a variable for workspace color. | |
| set -l tfworkspace_color (set_color green) | |
| # Append the workspace name at the current prompt position if | |
| # the directory contains a .terraform subdirectory | |
| if test -d .terraform |
| #!/bin/bash | |
| #Verify the quality with difference bitrate ( crf no work with h264_videotoolbox use -b:v ) | |
| #You can use the same audio codec change -c:a ac3 to -c:a copy i use it because it work my multimedia player | |
| for bitrate in 500k 1000k 1500k 2500k 3000k 3500k;do | |
| ffmpeg -i Movie.mkv -c:v h264_videotoolbox -c:a ac3 -b:a 128k -y -b:v $bitrate -ss 00:01:00 -t 00:00:10 Movie_$bitrate.mp4; | |
| done | |
| #With 2500k bitrate | |
| ffmpeg -i Movie.mkv -c:v h264_videotoolbox -c:a ac3 -b:a 128k -y -b:v $bitrate -b:a 128k Movie_$bitrate.mp4; |
Build VAAPI with support for VP8/9 decode and encode hardware acceleration on a Skylake validation testbed:
Build platform: Ubuntu 16.04LTS.
First things first:
Install baseline dependencies first
sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev intel-gpu-tools
| # -*- coding: utf8 -*- | |
| import av | |
| # Откроем ресурс на чтение | |
| input_resource = av.open( | |
| 'rtmp://src_stream:1935/play' | |
| ) | |
| # Откроем ресурс на запись. | |
| output_resource = av.open( |