作者:matrix
被围观: 4,371 次
发布时间:2016-12-30
分类:零零星星 |
无评论 »
安装环境 按照ubuntu正常安装的时候却报错:Lnmp Unable to get linux distribution name, or do NOT support the current di原因是因为 /etc/issue 中记录的是linux发行版本:elementary OS LokiLnmp脚本无法识别出为ubuntu的系统内核
修改main.sh文件
文件路径:/lnmp1.3/include/main.sh搜索关键字Get_Dist_Name()查找该方法替换为一下内容:
Get_Dist_Name(){ if grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then DISTRO='CentOS' PM='yum' elif grep -Eqi "Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "Red Hat Enterprise Linux Server" /etc/*-release; then ......
作者:matrix
被围观: 6,662 次
发布时间:2016-12-29
分类:零零星星 |
无评论 »
搭建方法:http://www.jianshu.com/p/b5c4fbadbfae
apt-get updateapt-get install python-pippip install shadowsocks
添加:/etc/shadowsocks.json
{"server":"my_server_ip","server_port":8388,"local_address": "127.0.0.1","local_port":1080,"password":"mypassword","timeout":300,"method":"aes-256-cfb","fast_open": false}
ssserver -c /etc/shadowsocks.json -d start我用ubuntu按照上面链接的方法来搭建的服务,安装运行到是ok,但是reboot重启Ubuntu的时候就发现出现问题。
编辑/etc/rc.local
添加开机自启动的命令失败:ssserver -c /etc/shadowsocks.json -d startUbuntu下/etc/rc.local 文件修改之后没有成功。实际上系......
作者:matrix
被围观: 33,141 次
发布时间:2015-10-29
分类:PHP |
114 条评论 »
苏宁云盘的下载速度还是不错的,之前获取下载地址很简单。现在必须要求用户登录才能办到,难度也是增加不少。还好suning没做绝。GOOD LUCK!提示: 回复可见网盘地址
源码
<?php/* 需要配置苏宁账户密码 @author Pang @url https://www.hhtjim.com*/error_reporting(0);$a = new suning($_GET['id']);$a->dl();class suning{ const USER = 'XXXXXX';//苏宁账户 url编码 const PAW = 'XXXXXXX';//苏宁密码 public function __construct($id) { $this->id = $id; } function tui($a) { die($a . '<br />Please Check <a href="https://www.hhtjim.com/message-wall#commen......
作者:matrix
被围观: 9,223 次
发布时间:2015-09-15
分类:兼容并蓄 零零星星 |
21 条评论 »
官网:https://letsencrypt.orggithub: https://github.com/letsencrypt/letsencrypt
这将表示如果一个网站只是需要最基本的HTTPS加密,那么将无需任何花费购买SSL证书。
Mozilla、思科、Akamai、IdenTrust、EFF 和密歇根大学研究人员宣布了 Let’s Encrypt CA项目,计划为网站提供免费 ssl 证书,加速将 Web 从 HTTP 过渡到 https。上个月才看到了这个消息,大咖阵容提供的公益项目。之前说好的9月份发布,怎么又推迟到了Q4 2015。网站使用https协议非常不错 。至少比普通网站多了一个绿色的标识,好看还安全~不容易被『挤挨服达不溜』监听到通讯内容。BUT网站使用https协议必须要有SSL证书,大多都是收费的。不过目前也有免费的,沃通、Cl......
作者:matrix
被围观: 11,609 次
发布时间:2015-07-31
分类:Wordpress 零零星星 |
10 条评论 »
WordPress缓存类WP_Object_Cache将数据缓存在内存中,每次请求,都会重新生成缓存。如果服务器支持内存缓存,如memcache 将会提高效率(相同页面处的多次查询数据)。减少数据库的请求次数。流量不大的用处也就不是很明显。总的来说,没啥用。留作零碎记录相关函数:
wp_cache_add($key, $data, $flag = '', $expire = 0);//添加缓存wp_cache_get($key, $flag = '');//得到缓存,没有则返回false//$key 自定义缓存名称//$data 缓存数据//$expire == 缓存 时间 部分可用//$group $expire 都是可选参数
例子:
if(!$most_viewed = wp_cache_get('widgetPostsViewEcho', 'CACH_DATAViewPosts')){ $most_viewed = $wpdb->get_results("........
作者:matrix
被围观: 9,121 次
发布时间:2015-06-27
分类:零零星星 |
18 条评论 »
有些在线截图无法获取到整张页面,只有半截。Web-Capture可以抓取完整的网页截图
http://web-capture.net/
使用:Enter the URL of the page you want to capture 输入你想抓取的网页地址Choose the file format you want 选择抓取保存的文件格式。图片一般就是jpeg的就行JPEG image、PDF file、TIFF image、BMP image、PNG image、Postscript file (PS)、SVG file点击Capture Web Page进行截图。截图完成后会调转到一个页面,可以view查看,下载图片或者zip文档 类似的网站还有page2images.com,它的好像不能截取整张图片,但是能选择移动端的UA。参考:https://free.com.tw/web-capture/http://www.ldsun.com/1053.html
作者:matrix
被围观: 7,122 次
发布时间:2015-06-23
分类:兼容并蓄 |
10 条评论 »
使用WeiPN Gate Client高科技上网的时候发现还有OpenVPN配置文件这种东东。没明白怎么用就查了查。原来还有个比较不错的上网选择,使用OpenWeiPN GUI。
OpenWeiPN GUI下载
官网http://openvpn.net/index.php/open-source/downloads.html百度网盘http://pan.baidu.com/s/1FbrzC
使用
1.安装完成OpenWeiPN2.找到软件安装目录下的config文件夹README.txtThis directory should contain OpenVPN configuration fileseach having an extension of .ovpnWhen OpenVPN is started as a service, a separate OpenVPNprocess will be instantiated for each configuration file.意思就是喊你把.ovpn文件放置在此目录(config文件夹)3.获取.ovpn文件......
作者:matrix
被围观: 4,875 次
发布时间:2015-06-20
分类:兼容并蓄 零零星星 |
一条评论 »
//静态变量的例子
/** * 将数组转换为字符 * * 用于缓存 * * @param $data * @return string */function philnaArray2String($data, $returns = ''){ static $t = 1; $tabType = " "; $tab = str_repeat($tabType, $t); $data = (array)$data; foreach ($data as $key => $value) { if (is_array($value)) { $t++; $returns .= "$tab'" . $key . "' => array(\n" . philnaArray2String($value) . "$tab),\n"; } else { if (!is_bool($value)) { $value = "'" . addslashes($value) . "'"; } $returns .= "$tab'" . $key . "' =......
- 1
... - 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
... - 50