- linuxに関する基本的な知識があるソフトウェアエンジニアもしくはヘビーユーザで、Quest 3のlinuxをGUI環境で使いたい人
- apkのインストールとか説明しませんが、Quest 3に入れたやつは、アプリ一覧からカテゴリでUntrusted Sourcesみたいなのを選ぶと出てきます
- termuxの上にlinux distroを載せるのは、遅いのでやりません(下記ベンチマーク参照)。prefixed-rootだろうがシングルユーザだろうがmusl libcだろうが我々なら大丈夫だ!
- linuxアプリのインストールは特記事項ない限り省略します。勝手にpkg 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
#! /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); | |
} |
大きなテキストファイルを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しない
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/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 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 ruby | |
require 'find' | |
BLOCK_SIZE = 512 # ブロックサイズは通常 512 バイト | |
def calculate_freed_space(paths) | |
inodes = {} | |
total_blocks = 0 | |
processed_files = {} |
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
# こいつは systemctl enable sshd-tcpd.socket する | |
[Unit] | |
Description=ssh | |
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run | |
Conflicts=ssh.socket | |
[Socket] | |
ListenStream=22 | |
Accept=yes |
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
fizz = function f() { | |
fizz = function () { | |
fizz = function () { | |
fizz = f | |
return "Fizz" | |
} | |
} | |
} | |
buzz = function f() { |
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
Rtop = 12; | |
Htop = 25; | |
Rin = 15; | |
Rout = 20; | |
H = 2 + (Rout - Rin) / 1.5; | |
thick = 1.2; | |
rows = 7; | |
cols = 5; | |
for (i = [0:cols - 1]) { |
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
# 必要なモジュールのインポート | |
import numpy as np | |
import scipy.stats as stats | |
# カウントされた足の本数 | |
counts = np.array([57, 62, 63, 60, 57, 60, 58, 60, 61, 62]) | |
# つるとかめの個体数は合計で20匹 | |
total_animals = 20 |
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
2752512 bytes alive from 0x7f8e184d27d1, alloc=84, free=0, collision=0 | |
X509_VAL_it at ??:? | |
SSL_set_ciphersuites at ??:? | |
966000 bytes alive from 0x7f8e185b746e, alloc=29642, free=26548, collision=0 | |
CRYPTO_zalloc at ??:? | |
229376 bytes alive from 0x7f8e184d27d1, alloc=7, free=0, collision=0 | |
X509_VAL_it at ??:? |
NewerOlder