Skip to content

Instantly share code, notes, and snippets.

Alex Huang FiveYellowMice

Block or report user

Report or block FiveYellowMice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@FiveYellowMice
FiveYellowMice / artemis_extract.rb
Last active Dec 27, 2018
Extracts files from Artemis Engine resource files (.psf).
View artemis_extract.rb
#!/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
View contaminative-moons.php
<?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',
@FiveYellowMice
FiveYellowMice / idc_chicories.rb
Created Feb 9, 2017
IDCChicories plugin for HoroBot2
View idc_chicories.rb
# 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 大佬们又要开始谈笑风生了。"
View horospeak.rb
#!/usr/bin/env ruby
# frozen_string_literal: true
class HoroSpeak
attr_accessor :debug_mode
@FiveYellowMice
FiveYellowMice / mc-im.rb
Created Nov 26, 2016
在 Linux 下的 Minecraft 中输入中文。拥有比 bash 脚本更好的鲁棒性,适应多种情形,并绕过了一些坑。
View mc-im.rb
#!/usr/bin/env ruby
# encoding: utf-8
# frozen_string_literal: true
# mc-im.rb
# ========
#
# 在 Linux 下的 Minecraft 中输入中文。拥有比 bash 脚本更好的鲁棒性,适应多种情形,并绕过了一些坑。
#
# 使用方法
View ruby-1.9.3-openssl-sslv3-patch.patch
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")
@FiveYellowMice
FiveYellowMice / delete-old-screenshots.rb
Created Nov 26, 2016
Automatically delete old screenshots. Run as a systemd timer or cron job.
View delete-old-screenshots.rb
#!/usr/bin/env ruby
SCREENSHOTS_DIR = ENV['SCREENSHOTS_DIR'] ||
ENV['HOME'] + '/Pictures/Screenshots'
MAXIMUM_TIME = ENV['MAXIMUM_TIME'] ||
60 * 60 * 24 # 1 day
#######################################
#
View horo-poi.php
<?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.
View yoitsuhorobot.service
[Unit]
Description=Run Yoitsu Horo bot once
[Service]
Type=oneshot
WorkingDirectory=/home/alex/Projects/yoitsuhorobot
ExecStart=/home/alex/Projects/yoitsuhorobot/yoitsuhorobot.sh
View annotation.md

What + Why + When + What effect = Annotaion

You can’t perform that action at this time.