- linuxに関する基本的な知識があるソフトウェアエンジニアもしくはヘビーユーザで、Quest 3のlinuxをGUI環境で使いたい人
- apkのインストールとか説明しませんが、Quest 3に入れたやつは、アプリ一覧からカテゴリでUntrusted Sourcesみたいなのを選ぶと出てきます
- termuxの上にlinux distroを載せるのは、遅いのでやりません(下記ベンチマーク参照)。prefixed-rootだろうがシングルユーザだろうがmusl libcだろうが我々なら大丈夫だ!
- linuxアプリのインストールは特記事項ない限り省略します。勝手にpkg installとかして
This file contains hidden or 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
| /** | |
| * Pull request #651 (https://github.com/h2o/quicly/pull/651) introduced an extra parameter called `payload` that specifies the | |
| * location of the payload to be encrypted (i.e., out-of-place encryption). Custom encryption callbacks can either adopt the new | |
| * API directly, or use a wrapper function that copies the out-of-place payload then calls the original function. | |
| * | |
| * The function below is an example of such a wrapper function. | |
| */ | |
| void new_encrypt_packet(struct st_quicly_crypto_engine_t *engine, quicly_conn_t *conn, ptls_cipher_context_t *header_protect_ctx, | |
| ptls_aead_context_t *packet_protect_ctx, ptls_iovec_t datagram, size_t first_byte_at, | |
| size_t payload_from, const void *payload, uint64_t packet_number, int coalesced) |
This file contains hidden or 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/perl | |
| # | |
| # Written in 2017 by Kazuho Oku | |
| # | |
| # To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. | |
| # You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
| # | |
| use strict; | |
| use warnings; |
This file contains hidden or 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/perl | |
| # | |
| # to test: | |
| # 1) run this script with either "accept" or "select-accept" as the argument | |
| # (the script listens to 127.0.0.1:12345) | |
| # 2) telnet localhost 12345 | |
| # 3) if you see "accept failed", there is the thundering herd problem | |
| # | |
| # | |
| use strict; |
This file contains hidden or 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/t/50connect-eyeballs.t b/t/50connect-eyeballs.t | |
| index 832c1b051..717ac0729 100644 | |
| --- a/t/50connect-eyeballs.t | |
| +++ b/t/50connect-eyeballs.t | |
| @@ -1,5 +1,6 @@ | |
| use strict; | |
| use warnings; | |
| +use File::Temp qw(tempdir); | |
| use IO::Socket::IP; | |
| use Test::More; |
This file contains hidden or 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
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <openssl/engine.h> | |
| #include <openssl/provider.h> | |
| #include "picotls.h" | |
| #include "picotls/openssl.h" | |
| int main(int argc, char **argv) | |
| { | |
| OSSL_PROVIDER *legacy = OSSL_PROVIDER_load(NULL, "legacy"); |
This file contains hidden or 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
| // proxy.js | |
| // Express server wrapping llama.cpp server with OpenAI function-calling semantics | |
| // Logs client requests/responses and model requests/responses to console | |
| const express = require('express'); | |
| const axios = require('axios'); | |
| const bodyParser = require('body-parser'); | |
| const { v4: uuidv4 } = require('uuid'); | |
| const { spawn } = require('child_process'); |
This file contains hidden or 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/perl | |
| use strict; | |
| use warnings; | |
| while (my $l = <STDIN>) { | |
| chomp $l; | |
| if ($l !~ /MiB/ and $l =~ /([0-9]+,[0-9,]+)/) { | |
| $l .= toMiB($1); | |
| } |
This file contains hidden or 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/src-main/context.c b/src-main/context.c | |
| index d84858c..08a0de5 100644 | |
| --- a/src-main/context.c | |
| +++ b/src-main/context.c | |
| @@ -594,7 +594,7 @@ anthy_save_history(const char *fn, struct anthy_context *ac) | |
| dprintf(fd, "\n"); | |
| /**/ | |
| errno = 0; | |
| - if (fchmod(fd, S_IREAD | S_IWRITE)) { | |
| + if (fchmod(fd, S_IRUSR | S_IWUSR)) { |
大きなテキストファイルをawkで処理するときにcatで投げ込むと速い理由のような事象が発生する原因についての推察。
自信はあまりない!
- __do_page_cache_readaheadは、次にreadaheadを実行すべきページについてのみReadaheadフラグをたてる
- 次にreadaheadを実行すべきページ「以降の全てのページ」ではない
- do_generic_file_readはReadaheadフラグの立っているページをreadするタイミングでpage_cache_async_readaheadを呼ぶ
- page_cache_async_readaheadはBDI_sync_congestedが立っている場合はreadaheadしない
NewerOlder