Chevereto Embed codes 嵌入代码修改

Chevereto默认的嵌入代码比较多, 可以删除一些不需要的.
/app/routes/route.image.php

        // Embed codes
        $embed = [];
        $embed['direct-links'] = [
                'label' => _s('Direct links'),
                'entries' => [
                        [
                                'label' => _s('Image link'),
                                'value' => $image['url_viewer']
                        ],
                        [
                                'label' => _s('Image URL'),
                                'value' => $image['url']
                        ],
                        [
                                'label' => _s('Thumbnail URL'),
                                'value' => $image['thumb']['url']
                        ],
                ]
        ];
        if($image['medium']) {
                $embed['direct-links']['entries'][] = [
                        'label' => _s('Medium URL'),
                        'value' => $image['medium']['url']
                ];
        }

这里开始就是一些嵌入代码, 可以根据自己的需求修改

Nginx显示目录文件列表功能

开启目录列表
在配置文件里location server 或 http段中加入

autoindex on;
autoindex_exact_size off;
autoindex_localtime on;

其中autoindex on;
是显示目录的参数

autoindex_exact_size off;
默认为on,显示出文件的确切大小,单位是bytes。
改为off后,显示出文件的大概大小,单位是kB或者MB或者GB

autoindex_localtime on;
默认为off,显示的文件时间为GMT时间。
改为on后,显示的文件时间为文件的服务器时间

- 阅读剩余部分 -

DirectAdmin一键安装MRTG流量负载图

DA官方有个大神写了一个脚本update.script for DirectAdmin, 里面包括安装MRTG.
http://forum.directadmin.com/showthread.php?t=22587

mkdir /usr/local/updatescript
cd /usr/local/updatescript
wget --no-check-certificate https://www.wael.name/script/update.script
chmod 755 update.script

./update.script
./update.script MRTG

完成后输入你的http://ip/mrtg查看

# GNU GENERAL PUBLIC LICENSE
# Version 2, June 1991
# Copyright (C) 2006,2007 Free Software Foundation, Inc.
# 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
# Update script made by Wael Isa
# H188, R4008, Arad 240, Kingdom of Bahrain
# https://www.wael.name/
# Version: 1.8.4
# Release Date: 1/9/2006
# Update Date : 18/8/2017

AlibabaCloud ECS删除安骑士(Agent)和aliyun-service

卸载Agent(安骑士)

wget http://update.aegis.aliyun.com/download/uninstall.sh
chmod +x uninstall.sh
./uninstall.sh

阿里云国际版的机器可以通过直接运行下面的脚本来卸载云盾(aegis)

sh /usr/local/aegis/uninstall.sh

删除aliyun-service

rm /usr/sbin/aliyun-service

CentOS 6 安装BT客户端-Transmission

RHEL/CentOS 6 64-Bit

wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

RHEL/CentOS 6 32-Bit

wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

然后:

yum install transmission transmission-daemon -y
service transmission-daemon start
service transmission-daemon stop

- 阅读剩余部分 -