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
<?php | |
function return_error($code, $message) { | |
http_response_code($code); | |
header('Content-Type: text/plain'); | |
echo $message."\n"; | |
die(); | |
} | |
if (in_array($_SERVER['REQUEST_METHOD'], ['HEAD', 'GET'])) { |
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
<?php | |
/* | |
Copyright 2019 FiveYellowMice | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
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 | |
# encoding: utf-8 | |
# fronze_string_literal: true | |
## | |
# Extracts files from Artemis Engine resource files (.psf). | |
# | |
# Tested on: | |
# - Memory's Dogma CODE:01 |
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
<?php | |
define('PREPARED_MOONS', [ | |
'apple_new_moon_with_face', | |
'apple_full_moon_with_face', | |
'apple_ios10_new_moon_with_face', | |
'apple_ios10_full_moon_with_face', | |
'noto_new_moon_with_face', | |
'noto_full_moon_with_face', | |
'segoe_new_moon_with_face', |
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
# frozen_string_literal: true | |
require 'active_support/core_ext/numeric/time' | |
class HoroBot2::Plugins::IDCChicories < HoroBot2::Plugins::Base | |
RECEIVE_ONLY_WHEN_MATCH = /(?<!\w)(?:线路|骨干网|教育网|数据中心|線路|骨幹網|教育網|數據中心|IDC|BGP|OVH|AnyCast|NTT|QoS|PCCW|IMS|TEA|Cogent|[a-z]{2,3}NET|GRX|IPX|TFN|CN2|CERNET|[a-z]{2}IX|[EG]PON)(?!\w)/i | |
MESSAGE = "\u{1f31a} IDC 大佬们又要开始谈笑风生了。" |
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 | |
# frozen_string_literal: true | |
class HoroSpeak | |
attr_accessor :debug_mode | |
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 | |
# encoding: utf-8 | |
# frozen_string_literal: true | |
# mc-im.rb | |
# ======== | |
# | |
# 在 Linux 下的 Minecraft 中输入中文。拥有比 bash 脚本更好的鲁棒性,适应多种情形,并绕过了一些坑。 | |
# | |
# 使用方法 |
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/ext/openssl/extconf.rb b/ext/openssl/extconf.rb | |
index 8c04cb5..132d803 100644 | |
--- a/ext/openssl/extconf.rb | |
+++ b/ext/openssl/extconf.rb | |
@@ -104,6 +104,9 @@ | |
have_func("SSLv2_method") | |
have_func("SSLv2_server_method") | |
have_func("SSLv2_client_method") | |
+have_func("SSLv3_method") | |
+have_func("SSLv3_server_method") |
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 | |
SCREENSHOTS_DIR = ENV['SCREENSHOTS_DIR'] || | |
ENV['HOME'] + '/Pictures/Screenshots' | |
MAXIMUM_TIME = ENV['MAXIMUM_TIME'] || | |
60 * 60 * 24 # 1 day | |
####################################### | |
# |
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
<?php | |
/********************************** | |
The MIT License (MIT) | |
Copyright (c) 2016 FiveYellowMice | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
NewerOlder