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
| [Unit] | |
| Description=Kcptun Client Service | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| User=nobody | |
| ExecStart=/etc/kcptun/kcptun_client -c /etc/kcptun/kcptun.conf | |
| Restart=always | |
| RestartSec=5 |
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
| #!/bin/sh | |
| # $1 is gid. | |
| # $2 is the number of files. | |
| # $3 is the path of the first file. | |
| DOWNLOAD=/data/aria2/download # no trailing slash! | |
| COMPLETE=/data/aria2/gg # no trailing slash! | |
| LOG=/data/aria2/mvcompleted.log | |
| SRC=$3 |
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
| /* 替换图片链接为 https */ | |
| function my_content_manipulator($content){ | |
| if( is_ssl() ){ | |
| $content = str_replace('http://doufu.ru/wp-content/uploads', 'https://doufu.ru/wp-content/uploads', $content); | |
| $content = str_replace('http://cdn.doufu.ru/', 'https://cdn.doufu.ru/', $content); | |
| $content = str_replace('http://doufu.ru/sth/', 'https://doufu.ru/sth/', $content); | |
| } | |
| return $content; | |
| } | |
| add_filter('the_content', 'my_content_manipulator'); |
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
| <?php | |
| function likeSingle($cid) { | |
| $db = likeSingleDb(); | |
| if ($db == null) Typecho_Response::throwJson(array('status'=>-1,'msg'=>'数据库有误!')); | |
| $prefix = $db->getPrefix(); | |
| if(!cid) Typecho_Response::throwJson(array('status'=>0,'msg'=>'请选择喜欢的文章!')); | |
| $likes = Typecho_Cookie::get('likes'); | |
| if(empty($likes)){ | |
| $likes = array(); | |
| } else { |
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
| #!/bin/bash | |
| # settings start | |
| email="root@localhost" | |
| pin="*/1 * * * *" | |
| # settings end | |
| cron=$1 | |
| test -z "$cron" && exit 1 | |
| if [ "$cron" != "cron" ]; then | |
| if [ ! -d /etc/arecord_moniter ]; then | |
| CURDIR=$(cd $(dirname ${BASH_SOURCE[0]}); pwd ) |
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
| #/bin/bash | |
| SSH_PORTS=`cat /etc/ssh/sshd_config | grep 'Port ' | grep -v '#'` | |
| FIRST_PORT=`echo ${TEST} | head -n 1` | |
| if [ -n ${FIRST_PORT} ];then | |
| echo ${SSH_PORTS} | |
| else | |
| echo 22 | |
| fi |
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
| #/bin/bash | |
| linux_check() { | |
| if $(grep -qi "CentOS" /etc/issue) || $(grep -q "CentOS" /etc/*-release); then | |
| OS="CentOS" | |
| elif $(grep -qi "Ubuntu" /etc/issue) || $(grep -q "Ubuntu" /etc/*-release); then | |
| OS="Ubuntu" | |
| elif $(grep -qi "Debian" /etc/issue) || $(grep -q "Debian" /etc/*-release); then | |
| OS="Debian" | |
| else | |
| cat >&2 <<-'EOF' |
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
| #/bin/sh | |
| ip=$1 | |
| echo ${ip}|grep "^[0-9]\{1,3\}\.\([0-9]\{1,3\}\.\)\{2\}[0-9]\{1,3\}$" > /dev/null; | |
| if [ $? -eq 0 ] | |
| then | |
| result=`curl "http://ip.huomao.com/ip?ip=${ip}" 2>/dev/null` | |
| result=${result:1:(-1)} | |
| country=`echo ${result} | awk -F, '{ print $1}' | awk -F: '{ print $2}'` | |
| province=`echo ${result} | awk -F, '{ print $2}' | awk -F: '{ print $2}'` | |
| city=`echo ${result} | awk -F, '{ print $3}' | awk -F: '{ print $2}'` |
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
| body { | |
| overflow-x: hidden; | |
| min-width: 600px; | |
| background-color: #F7F7F7 | |
| } | |
| #container { | |
| width: 100% | |
| } | |
| #content_right { | |
| display: none |
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
| @-moz-document domain("github.com") { | |
| a[href$=".sh"]::before { | |
| content:url("moz-icon://.sh?size=16"); | |
| } | |
| a[href$=".js"]::before { | |
| content:url("moz-icon://.js?size=16"); | |
| } | |
| } |