Fedora Notes
# ^_^
sudo su -

# Configure dnf
cat <<EOF >> /etc/dnf/dnf.conf
fastestmirror=True
EOF

dnf update

dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

dnf install gnome-tweak-tool gnome-shell-extension-window-list gnome-shell-extension-apps-menu gnome-terminal-nautilus vim ruby nodejs

dnf group install "Development Tools" "C Development Tools and Libraries"

# Install chrome
# dnf install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

# Disable mouse acceleration
# dnf remove xorg-x11-drv-libinput
# cat <<EOF > /etc/X11/xorg.conf.d/50-no-mouse-acceleration.conf
# Section "InputClass"
#     Identifier "My Mouse"
#     MatchIsPointer "yes"
#     Option "AccelerationProfile" "-1"
#     Option "AccelerationScheme" "none"
# EndSection
# EOF

# Remove unnecessary softwares
# dnf remove orca gnome-software gnome-weather gnome-maps gnome-clocks abrt*

# Handle lid switch
# vim /etc/systemd/logind.conf

# Configure grub
# In Hyper-V:
# append "video=hyperv_fb:1920x1080 elevator=noop" to GRUB_CMDLINE_LINUX
# To hide the boot menu, set
# GRUB_TIMEOUT=0
# GRUB_HIDDEN_TIMEOUT=1
# GRUB_HIDDEN_TIMEOUT_QUIET=true
vim /etc/default/grub
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

# Default to cli
# systemctl set-default multi-user.target

# Disable SELinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

# Disable firewall
# systemctl disable firewalld

# Start an OpenSSH server
# service sshd start

# Change firefox UI language
# https://addons.mozilla.org/firefox/language-tools/
# about:config intl.locale.requested (zh-CN)

# Shadowsocks
# dnf copr enable librehat/shadowsocks
# dnf install shadowsocks-libev

# Sublime Text
# rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
# dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
# dnf install sublime-text
Hello World

正在努力学习 HTML, CSS, Javascript, PHP, rails 等各种东西中。

高三学生狗苦逼伤不起啊!而且我有种就算学了也不会美化网页的感觉。 美术从未及格的渣渣哭了:sob:

我觉得我人生观世界观价值观审美观已经没救了。

话说回来,Jekyll 还真是方便,连我这种渣渣都能玩得起来呢~:kissing_heart:

I18n
//=============================================================================
// i18n.js
//=============================================================================

/*:
 * @plugindesc Module for i18n.
 * @author taroxd
 *
 * @param Default Locale
 * @desc The language used when the language detected is not supported.
 * @default en-US
 *
 * @param Resource Folder
 * @desc The folder where resource files are put in.
 * @default data/i18n
 *
 * @help
 *
 * Prefix any string in the RPGMV editor with "__ " to enable i18n for it.
 *
 * Plugin Command:
 *   i18n en-US      # set language to en-US
 */

window.i18n = function() {

    var parameters = PluginManager.parameters('i18n');
    var defaultLocale = parameters['Default Locale'];
    var supportedLocale = parameters['Supported Locale'];
    var resourceFolder = parameters['Resource Folder'];

    function i18n(string) {
        return (i18n[i18n.language] || {})[string] || string;
    }

    Object.defineProperty(i18n, 'language', {
        get: function() { return i18n._language; },
        set: function(lang) {
            if (lang == null) lang = navigator.language;
            lang = lang.substr(0, 3).toLowerCase() + lang.substr(3).toUpperCase();
            loadI18nResources(lang,
                function() { i18n._language = lang; },
                function() { i18n._language = defaultLocale; }
            );
        }
    });

    function loadI18nResources(language, onload, onerror) {
        if (i18n[language]) return onload();
        var xhr = new XMLHttpRequest();
        var url = resourceFolder + '/' + language + '.json';
        xhr.open('GET', url);
        xhr.overrideMimeType('application/json');
        xhr.onload = function() {
            if (xhr.status < 400) {
                i18n[language] = JSON.parse(xhr.responseText);
                onload();
            }
        };
        xhr.onerror = onerror;
        xhr.send();
    };

    function overrideObj(obj) {
        if (obj == null) return obj;
        Object.keys(obj).forEach(function(key) {
            var value = obj[key];
            switch(typeof value) {
            case 'string':
                if (value.startsWith('__ ')) {
                    value = value.substr(3);
                    Object.defineProperty(obj, key, {
                        get: function() { return i18n(value); },
                        set: function(v) { value = v; },
                        enumerable: true,
                        configurable: true
                    });
                }
                break;
            case 'object':
                overrideObj(value);
                break;
            }
        });
        return obj;
    }

    // override method
    DataManager.loadDataFile = function(name, src) {
        var xhr = new XMLHttpRequest();
        var url = 'data/' + src;
        xhr.open('GET', url);
        xhr.overrideMimeType('application/json');
        xhr.onload = function() {
            if (xhr.status < 400) {
                window[name] = overrideObj(JSON.parse(xhr.responseText));
                DataManager.onLoad(window[name]);
            }
        };
        xhr.onerror = function() {
            DataManager._errorUrl = DataManager._errorUrl || url;
        };
        window[name] = null;
        xhr.send();
    };

    Object.defineProperty(ConfigManager, 'language', {
        get: function() { return this._language; },
        set: function(lang) {
            this._language = lang;
            i18n.language = lang;
        },
        configurable: true
    });

    var makeData = ConfigManager.makeData;
    ConfigManager.makeData = function() {
        var config = makeData.call(this);
        config.language = this.language;
        return config;
    };

    var applyData = ConfigManager.applyData;
    ConfigManager.applyData = function(config) {
        applyData.call(this, config);
        this.language = config.language;
    };

    var pluginCommand = Game_Interpreter.prototype.pluginCommand;
    Game_Interpreter.prototype.pluginCommand = function(command, args) {
        pluginCommand.call(this, command, args);
        if (command === 'i18n') {
            ConfigManager.language = args[0];
            ConfigManager.save();
        }
    };

    return i18n;
}();