Centos 6 & Centos 7 Yum安装aMule

1.安装源文件

Centos 6
yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm

Centos 7
yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

2.安装(我这里安装不带GUI版本)

Centos 6 & 7
yum install amule-nogui -y

3.安装完成

2020/01/22 posted in  Tips

Shadowsocks-NG-R8订阅失效问题

在下图中为止添加如下两句话

.......

<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key> 
<true/>
</dict>

WX20191205-093035@2x

2019/12/10 posted in  Tips

Centos 8 直接开启BBR

由于Centos8内核默认已经升级到 4.18 , 所以可以直接开启BBR

1.修改配置文件

vim /etc/sysctl.conf

2.添加配置选项

net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

3.启动

sysctl -p
2019/11/11 posted in  Tips

MacOS删除文件不释放空间?

我今天遇到了一个很头疼的问题,我删除了很多文件但是使用空间一直没有被释放。

在终端里面 df -Hs 后看到使用空间一点也没有被释放。

最后找到了Apple在线客服,使用一条命令就完成了。

tmutil thinlocalsnapshots / 999999999999999 4
2019/08/22 posted in  Tips

在MacOS下无需安装任何工具解压PKG

xar -xf [文件名].pkg //之后会解压出来一个新的pkg文件

cat [新的pkg文件名].pkg/Payload | cpio -i //就可以解压出来相应的app了
2019/08/01 posted in  Tips

不使用PHPExcel导出Excel文件

$table = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><style type="text/css">
.excelTable  {border-collapse:collapse;border:thin solid #999;}
.excelTable  th {border: thin solid #999;padding:20px;text-align: center;border-top: thin solid #999;background-color: #E6E6E6;}
.excelTable  td {border:thin solid #999;padding:2px 5px;text-align: center;}
</style></head><body>';
$table .= "<table>
            <thead>
                <tr>
                    <th class='name'>追逆ID</th>
                    <th class='name'>用户ID</th>
                    <th class='name'>状态</th>
                    <th class='name'>创建时间</th>
                    <th class='name'>问题描述</th>
                    <th class='name'>问题类型</th>
                    <th class='name'>问题图片1</th>
                    <th class='name'>问题图片2</th>
                    <th class='name'>问题地址</th>
                    <th class='name'>投诉人电话</th>
                    <th class='name'>备注</th>
                </tr>
            </thead>
            <tbody>";
foreach ($innerdata as $k => $v) {
    $id = $v['id'];
    $userid = $v['users_id'];
    $status = $v['status']==1?'已过审':'未过审';
    $create_time = $v['create_time'];
    $qcon = $v['qcon'];
    $qid = getQName($v['qid']);
    $photo1 = $v['photo1'];
    $address = $v['address'];
    $phone = $v['phone'];
    //$unionid = $v['wx_unionid'];
    $unionid = $v['users_id'];
    $tag = $v['tag'];

    $tmp = json_decode($v['photo2']);
    $ttmp = '';
    foreach ($tmp as $v){
        $ttmp .= $v.',';
    }
    $photo2 = $ttmp;

    $table .= "<tr>
                    <td class='name'>{$id}</td>
                    <td class='name'>{$userid}</td>
                    <td class='name'>{$status}</td>
                    <td class='name'>{$create_time}</td>
                    <td class='name'>{$qcon}</td>
                    <td class='name'>{$qid}</td>
                    <td class='name'>{$photo1}</td>
                    <td class='name'>{$photo2}</td>
                    <td class='name'>{$address}</td>
                    <td class='name'>{$phone}</td>
                    <td class='name'>{$tag}</td>
                </tr>";
}
$table .= "</tbody>
        </table>
        </body>
        </html>";

//通过header头控制输出excel表格
header("Pragma: public");
header("Expires: 0");
header("Cache-Control:must-revalidate, post-check=0, pre-check=0");
header("Content-Type:application/force-download");
header("Content-Type:application/vnd.ms-execl");
header("Content-Type:application/octet-stream");
header("Content-Type:application/download");;
header('Content-Disposition:attachment;filename="百日攻坚.xls"');
header("Content-Transfer-Encoding:binary");
echo $table;
2019/07/22 posted in  Tips

1.Mac上如何安装Python3和scrapy

  1. 安装brew
    使用浏览器打开
    https://brew.sh/,按照提示在**终端**输入下面信息
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  1. 安装Command Line Tools,在终端中输入下面命令
xcode-select --install
  1. 安装GCC编译器,在终端中输入下面命令
brew install gcc
  1. 安装后使用brew安装Python3,在终端中输入下面命令
brew install python3
  1. 安装scrapy,在终端中输入下面命令
pip3 install scrapy
2018/12/28 posted in  scrapy