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
def package_local_targets(input_dir, output_dir): | |
trace = 'package_local_targets' | |
os.chdir(input_dir) | |
try: | |
print(f"{trace}: create directory {output_dir}") | |
os.makedirs(output_dir) | |
except FileExistsError: | |
print(f"delete existing {output_dir}") | |
shutil.rmtree(output_dir) |
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
cd ~ | |
apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y | |
#https://github.com/wkhtmltopdf/wkhtmltopdf/releases | |
#replace arch | |
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb | |
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb | |
apt --fix-broken install |
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
'use strict' | |
const CLASSNAME_WAITING = 'is-waiting' | |
const CLASSNAME_LOADING = 'is-loading' | |
const CLASSNAME_PREROLL = 'is-preroll' | |
const CLASSNAME_PLAYING = 'is-playing' | |
const CLASSNAME_PROBLEM = 'is-problem' | |
// <https://developers.google.com/interactive-media-ads/docs/sdks/html5/sdk-player> | |
function ads (target) { |
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
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c | |
index a3a2ef5..1691d15 100644 | |
--- a/libavcodec/nvenc.c | |
+++ b/libavcodec/nvenc.c | |
@@ -1157,7 +1157,7 @@ static av_cold int nvenc_setup_surfaces(AVCodecContext *avctx) | |
NvencContext *ctx = avctx->priv_data; | |
int i, res; | |
int num_mbs = ((avctx->width + 15) >> 4) * ((avctx->height + 15) >> 4); | |
- ctx->nb_surfaces = FFMAX((num_mbs >= 8160) ? 32 : 48, | |
+ ctx->nb_surfaces = FFMAX((num_mbs >= 8160) ? 8 : 12, |
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 virtual dice roller that accepts standard dice notation | |
* | |
* | |
* Dice Notation | |
* | |
* [Num Dice] d <Num Sides> [Modifier] | |
* | |
* | |
* Num Dice - Number of dice to roll (optional) |
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
Decoding the data in /proc/net/tcp: | |
Linux 5.x /proc/net/tcp | |
Linux 6.x /proc/PID/net/tcp | |
Given a socket: | |
$ ls -l /proc/24784/fd/11 | |
lrwx------ 1 jkstill dba 64 Dec 4 16:22 /proc/24784/fd/11 -> socket:[15907701] |