7 Days to Die Dedicated Server in Docker

vinanrra/7dtd-server - Docker Image | Docker Hub vinanrra/Docker-7DaysToDie: 7 days to die server using LinuxGSM in Docker with backups, monitor, auto-installable mods and more aoirint/seven-days-server-test: 7 Days to Die Dedicated ServerのDocker Compose構成テスト vinanrra/7dtd-serverを使用します。 7 Days to Die α20.7 パーティ人数は7 Days to Dieの仕様で8人まで 9人以上の仲間で遊ぶ場合は複数パーティ組むなどの工夫が必要 もしくはDLL改変で上限を外せる可能性がある UnKnoWnCheaTs - Multiplayer Game Hacking and Cheats - View Single Post - [Question] 7 days to die - Max players in group/party RAM: 8人・マップPREGEN6kで8GB程度はほしい、1人でも最低4GB docker-compose.yml # Based on https://github.com/vinanrra/Docker-7DaysToDie/blob/d5dbbb4e2ec65614b985d653f51725932d171dc7/docs/usage.md version: '3.8' services: 7dtdserver: image: "vinanrra/7dtd-server:v0.5.0" restart: always # INFO - NEVER USE WITH START_MODE=4 or START_MODE=0 environment: - START_MODE=1 # Change between START MODES - VERSION=alpha20.7 # Change between 7 days to die versions - PUID=1000 # Remember to use same as your user - PGID=1000 # Remember to use same as your user - TimeZone=Asia/Tokyo # Optional - Change Timezone - BACKUP=NO # Optional - Backup server at 5 AM - MONITOR=NO # Optional - Keeps server up if crash volumes: - ./volumes/7DaysToDie:/home/sdtdserver/.local/share/7DaysToDie/ - ./volumes/LGSM-Config:/home/sdtdserver/lgsm/config-lgsm/sdtdserver/ - ./volumes/ServerFiles:/home/sdtdserver/serverfiles/ # Optional - serverfiles folder - ./volumes/log:/home/sdtdserver/log/ # Optional - Logs folder - ./volumes/backups:/home/sdtdserver/lgsm/backup/ # Optional - If BACKUP=NO, backups folder ports: - 26900:26900/tcp # Default game ports - 26900:26900/udp # Default game ports - 26901:26901/udp # Default game ports - 26902:26902/udp # Default game ports # - 8080:8080/tcp # OPTIONAL - WEBADMIN # - 8081:8081/tcp # OPTIONAL - TELNET # - 8082:8082/tcp # OPTIONAL - WEBSERVER https://7dtd.illy.bz/wiki/Server%20fixes 7 Days to Dieサーバ本体のアップデート https://github.com/vinanrra/Docker-7DaysToDie/blob/9327daecb66d412b520532f739111955e7985aa5/docs/parameters.md#start-modes docker-compose.ymlのenvironmentを以下のように変更します。 ...

2023年4月24日 · aoirint

Selenium HTTPリクエストのURLを記録する(Chrome, Python)

Selenium 4.9.0 Chrome 112 ChromeDriver 112.0.5615.49 Python 3.11 import time import json from selenium.webdriver import ( Chrome, DesiredCapabilities, ) desired_capabilities = DesiredCapabilities.CHROME desired_capabilities["goog:loggingPrefs"] = { "performance": "ALL", } driver = Chrome( desired_capabilities=desired_capabilities, ) driver.implicitly_wait(5) driver.get("https://www.google.com/") known_url_set = set() while True: performance_log_entries = driver.get_log("performance") for log_entry in performance_log_entries: log_message = json.loads(log_entry.get("message", "{}")).get("message", {}) method = log_message.get("method") params = log_message.get("params", {}) if method == "Network.responseReceived": response = params.get("response", {}) url = response.get("url") if url in known_url_set: continue known_url_set.add(url) print(url) time.sleep(1) Python+SeleniumでChromeデベロッパーツールのNetworkタブ相当の情報を取得する - Qiita java - Using Selenium how to get network request - Stack Overflow

2023年4月24日 · aoirint

Selenium デフォルトダウンロードディレクトリを変更する(Chrome, Python)

Selenium 4.9.0 Chrome 112 ChromeDriver 112.0.5615.49 Python 3.11 from selenium.webdriver import ( Chrome, ChromeOptions, ) download_dir = "./downloads" os.makedirs(download_dir, exist_ok=True) options = ChromeOptions() options.add_experimental_option("prefs", { "profile.default_content_settings.popups": 0, "download.default_directory": os.path.realpath(download_dir), "download.prompt_for_download": False, "download.directory_upgrade": True, }) driver = Chrome( options=options, ) python - How to change download directory location path in Selenium using Chrome? - Stack Overflow

2023年4月24日 · aoirint

動画を繋げる(FFmpeg)

Git Bash (Git for Windows) 2.32.0 ffmpeg version N-109977-gaca7ef78cc-20230309 連番の動画ファイルを順番通りに繋げて、1つの動画ファイルにします。 lsコマンドの-vオプションは、自然な数字順にソートします。 ls -v *.ts | sed "s/.*/file '&'/" > list.txt ffmpeg -f concat -safe 0 -i list.txt -c copy -map 0 -map_metadata 0 output.mp4 Concatenate – FFmpeg 【 ls 】コマンド(並べ替え編)――表示結果を並べ替える:Linux基本コマンドTips(29) - @IT Add prefix to line that is the pattern of text after dot using sed or other command - Unix & Linux Stack Exchange

2023年4月24日 · aoirint

FFmpegで動画を逆再生化するPythonスクリプト

MATVToolに組み込むかもしれませんが、いまのところ詳細な動作検証をするほど需要がないので、簡易的にここに置いておきます。 動画ファイルによっては、フレームの欠け、重複が発生したり、変換に失敗するかもしれません。 Python 3.11.3 FFmpeg 4.2.7-0ubuntu0.1 Ubuntu 20.04 (WSL2) python3 main.py input.mp4 output.mp4 # License: CC0-1.0 import os import subprocess import tempfile import re import math def get_duration_seconds(input_file: str) -> float: proc = subprocess.run( [ 'ffmpeg', '-hide_banner', '-i', input_file, ], stderr=subprocess.PIPE, ) lines = proc.stderr.decode(encoding='utf-8').splitlines() # hh:mm:ss.ff duration_string = None for line in lines: m = re.match(r'^\s*Duration:\s(.+?),.*$', line) if m: duration_string = m.group(1) break assert duration_string is not None hours = int(duration_string[0:2]) minutes = int(duration_string[3:5]) seconds = int(duration_string[6:8]) milliseconds = float('0.' + duration_string[9:11]) return hours * 3600 + minutes * 60 + seconds + milliseconds def parse_time(string: str) -> float: """ string: HH:MM:SS.FF """ hours = int(string[0:2]) minutes = int(string[3:5]) seconds = int(string[6:8]) milliseconds = float('0.' + string[9:11]) return hours * 3600 + minutes * 60 + seconds + milliseconds def format_time(seconds: int) -> str: hours_minutes = seconds // 60 hours = hours_minutes // 60 minutes = hours_minutes - hours * 60 local_seconds = seconds - hours_minutes * 60 return f'{hours:02d}:{minutes:02d}:{local_seconds:02d}' def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('input_file', type=str) parser.add_argument('output_file', type=str) parser.add_argument('--split_duration', type=int, default=10) args = parser.parse_args() input_file = args.input_file output_file = args.output_file split_duration = args.split_duration duration_seconds = math.ceil(get_duration_seconds(input_file=input_file)) count = math.ceil(duration_seconds / split_duration) work_dir_obj = tempfile.TemporaryDirectory() work_dir = work_dir_obj.name part_output_file_list = [] for index in range(count): start = index * split_duration end = start + split_duration start_string = format_time(start) end_string = format_time(end) print(index, start_string, end_string) part_output_file = os.path.join(work_dir, f'output{count-index}.mp4') subprocess.run([ 'ffmpeg', '-hide_banner', '-ss', start_string, '-to', end_string, '-i', 'input.mp4', '-vf', 'reverse', '-af', 'areverse', part_output_file, ]) part_output_file_list.append(part_output_file) list_file = os.path.join(work_dir, 'list.txt') with open(list_file, 'w', encoding='utf-8') as fp: for part_output_file in part_output_file_list: fp.write(f"file '{part_output_file}'\n") subprocess.run([ 'ffmpeg', '-hide_banner', '-f', 'concat', '-safe', '0', '-i', list_file, '-c', 'copy', output_file, ]) if __name__ == '__main__': main() 参考 How to Reverse a Video using FFmpeg - OTTVerse 映像と音声を逆再生にエンコードする | ニコラボ FFMPEGで動画を逆再生して保存する方法 | 技術的特異点 Concatenate – FFmpeg

2023年4月18日 · aoirint

ボイボ寮祭・ずんだぱ~てぃ9に一般参加してきました

2023年3月25日、川崎市産業振興会館で開催された、「ボイボ寮祭」および「ずんだぱ~てぃ9」に一般参加してきました。 ボイボ寮祭: VOICEVOXオンリーの同人誌即売会 ずんだぱ~てぃ: ずんだホライずん(東北ずん子プロジェクト)オンリーの同人誌即売会 ツイート1 【一般参加まとめ】 イベント開催は12:00から 入場には事前登録が必要→LivePocketで1200円 https://t.livepocket.jp/e/le01l 当日対応は1500円 〈コスプレ〉 事前登録してね→LivePocketで600円 https://t.livepocket.jp/e/5t6yj 余裕があれば当日受付1000円 Webサイト確認してねhttp://voicevox.net #ボイボ寮祭 — ボイボ寮祭 (@voivo_only) March 11, 2023 ツイート2 【一般参加まとめ】 イベント開催は12:00から 入場には事前登録が必要→LivePocketで1200円 https://t.livepocket.jp/e/le01l 当日対応は1500円 〈コスプレ〉 事前登録してね→LivePocketで600円 https://t.livepocket.jp/e/5t6yj 余裕があれば当日受付1000円 Webサイト確認してねhttps://zunko.moe #ずんぱ — ずんだぱ~てぃ準備会 (@zunda_party) March 11, 2023 同人誌即売会の一般参加は2022年3月のボイスコネクト2(VOICEROID、CeVIO中心の同人即売会)以来です。 ちなみに、ボイスコネクト3は、2023年9月30日に2022年3月と同じ大田区産業プラザPiOで開催予定です。 ツイート3 川崎に着弾 — aoirint🎐 (@aoirint) March 25, 2023 主な参加動機は、 コミュニティの熱量を見たい、というヒホさんに同調して、モチベーションに繋がればと思ったこと、 普段生放送や動画を見ているクリエイターの方や、キャラクター運営さんや代理人の方、 動画投稿者名義のほうで交流のある方がいらっしゃることです。 VOICEVOXオフ オフラインでVOICEVOX関係者と会う貴重な機会で、 VOICEVOX開発者のヒホさん、 VOICEVOXコミュニティDiscord運営のコイル六重奏さん、 SHAREVOX開発者・VOICEVOXメンテナーのYちゃん、 VOICEVOXレビュワーのSuitCaseさんとお会いして、 開発の話をしたり、 夕食をご一緒したりしました。 ヒホさんと会うのは昨年のボイスコネクト2以来、ほかの方は初めてでした。 VOICEVOXコントリビューター(広義)エンカ会 @hiho_karuta @hk_coil424 @pickled_chair @aoirint — Yちゃん (@y_chan_dev) March 25, 2023 ごはん! — aoirint🎐 (@aoirint) March 25, 2023 ...

2023年4月17日 · aoirint

markdownlint-cli2

Node.js 18.16.0 markdownlint-cli2 0.6.0 https://www.npmjs.com/package/markdownlint-cli2 npm install -g markdownlint-cli2 # lint markdownlint-cli2 # format markdownlint-cli2-fix Config .markdownlint-cli2.yaml Example: https://github.com/DavidAnson/markdownlint/blob/fcb8190781c80b292ac44f6df984326e0e6c69cd/schema/.markdownlint.yaml # https://github.com/DavidAnson/markdownlint # https://github.com/DavidAnson/markdownlint-cli2 globs: - "**/*.md" ignores: - ".git/**" - ".github/**" config: # h1 MD025: false # inline HTML MD033: false

2023年4月17日 · aoirint

GatsbyのsiteMetadataにカスタムデータを追加する

Node.js 18.16.0 Gatsby 5.8.1 gatsby-config.ts const config: GatsbyConfig = { siteMetadata: { siteUrl: "https://example.com", title: "Example Blog", myCustomData: myCustomData, }, graphqlTypegen: true, // ... } gatsby-node.ts export const createSchemaCustomization: GatsbyNode['createSchemaCustomization'] = ({ actions }) => { const { createTypes } = actions createTypes(` type MyCustomData { text: String flag: Boolean } type SiteSiteMetadata { myCustomData: MyCustomData } `) } mypage.tsx import * as React from "react" import { graphql, PageProps, } from 'gatsby' import { GetMyPageQuery } from '../gatsby-types' const MyPage: React.FC<PageProps<GetMyPageQuery>> = (props) => { const data = props.data const site = data?.site const myCustomData = site?.siteMetadata?.myCustomData // ... } export const pageQuery = graphql` query GetMyPage { site { siteMetadata { myCustomData { text flag } } } } ` export default MyPage 参考 https://github.com/gatsbyjs/gatsby/issues/1781 https://stackoverflow.com/questions/61530280/unable-to-filter-custom-data-in-sitemetadata-in-gatsby-using-graphql-in-graphiql https://tomiko0404.hatenablog.com/entry/2022/02/20/gatasby-graphql-datalayer https://stackoverflow.com/questions/62984585/gatsby-how-to-handle-undefined-fields-in-sitemetadata

2023年4月17日 · aoirint

Jenkinsのapt GPGキーを更新する

$ sudo apt update Err:9 https://pkg.jenkins.io/debian-stable binary/ Release.gpg The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5BA31D57EF5975CA W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://pkg.jenkins.io/debian-stable binary/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5BA31D57EF5975CA W: Failed to fetch https://pkg.jenkins.io/debian-stable/binary/Release.gpg The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5BA31D57EF5975CA W: Some index files failed to download. They have been ignored, or old ones used instead. ...

2023年4月17日 · aoirint

Gitの改行コード自動置換機能(autocrlf)を無効化する

https://stackoverflow.com/questions/21822650/disable-git-eol-conversions git config --global core.autocrlf false git add --renormalize . すでにautocrlfが適用されたファイルを元に戻すために、既存のローカルリポジトリではadd --renormalizeが必要です。 GitのCRLF自動置換機能のためにDocker Buildに失敗する例 改行コードCRLFで以下のようなDockerfileを作成すると、 # syntax=docker/dockerfile:1.4 FROM ubuntu:22.04 RUN <<EOF set -eux echo "OK" EOF 以下のようなエラーとなり、ビルドに失敗します。 ------ > [2/2] RUN <<EOF (set -eux...): #8 0.294 /bin/sh: 1: set: Illegal option - ------ executor failed running [/bin/sh -c set -eux echo "OK" ]: exit code: 2 GitのCRLF自動置換機能によって、Dockerfileの改行コードがCRLFに書き換えられることでも同じことが起きます。 Linuxの仮想化ソフトウェアであるDockerの構成ファイルにCRLFが使われることが想定されないのは理解できます。 WindowsでDockerを扱っていることは理解してください。 .gitattributesでリポジトリごとに改行コードのポリシーを変更することができますが、令和の時代に改行コードの切り替えができないテキストエディタを使うこともないと思われるので、 不要なCRLF自動置換機能を無効化する方が、たくさんのリポジトリを扱う人には向いているでしょう。

2023年4月16日 · aoirint