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/env bash | |
| # smart_audit.sh - SMART全台チェック&総合判定(OK/WARN/ALERT) | |
| # deps: smartmontools, (optional) mailutils | |
| export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | |
| set -euo pipefail | |
| LC_ALL=C | |
| # ========================= | |
| # Config |
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 <stdio.h> | |
| #include <dirent.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <errno.h> | |
| #include <sys/stat.h> |
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
| version: '3.8' | |
| services: | |
| https-portal: | |
| image: steveltn/https-portal:1 | |
| ports: | |
| - '80:80' | |
| - '443:443' | |
| networks: | |
| - web_network | |
| environment: |
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
| #define _GNU_SOURCE | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <errno.h> | |
| int main (int argc, char *argv[]) |
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
| #define _GNU_SOURCE | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <errno.h> | |
| int main (int argc, char *argv[]) |
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
| #define _GNU_SOURCE | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <errno.h> | |
| int main (int argc, char *argv[]) |
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/env ruby | |
| # -*- coding: utf-8 -*- | |
| # 以下2つのプロセスを用意して、同時に実行 | |
| # 1つ目のプロセスで1MBのファイルを40000個削除する | |
| # 2つ目のプロセスでddで/dev/zeroから1GBファイルをディスクにwrite | |
| # * 40000ファイルrmとddを同時に行う(チョークなし)実験結果 | |
| # 1. 1073741824 bytes (1.1 GB) copied, 13.3225 s, 80.6 MB/s | |
| # 2. 1073741824 bytes (1.1 GB) copied, 14.1681 s, 75.8 MB/s |
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
| require 'getoptlong' | |
| require 'bayesdebug' | |
| class AAA | |
| def self.test | |
| opts = GetoptLong.new( | |
| [ '--help', '-h', GetoptLong::NO_ARGUMENT ], | |
| [ '--repeat', '-n', GetoptLong::REQUIRED_ARGUMENT ], | |
| [ '--name', GetoptLong::OPTIONAL_ARGUMENT ] | |
| ) |
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/lib/getoptlong.rb b/lib/getoptlong.rb | |
| index 259382e..ae96943 100644 | |
| --- a/lib/getoptlong.rb | |
| +++ b/lib/getoptlong.rb | |
| @@ -446,7 +446,8 @@ class GetoptLong | |
| terminate | |
| return nil | |
| elsif @ordering == PERMUTE | |
| - while 0 < ARGV.length && ARGV[0] !~ /^-./ | |
| +## while 0 < ARGV.length && ARGV[0] !~ /^-./ correct |
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
| require 'bayesdebug.rb' | |
| class Eratosthenes20 | |
| def self.isMultiple2(i) | |
| ## if i == 3 | |
| if i == 3 | |
| return false | |
| end | |
NewerOlder