`
文章列表
/usr/local/bin/ffmpeg -i 1.amr 1.mp3  
写道 util/Indexer.php --source=mysql://root:root3306@127.0.0.1/blog/blog --clean demo  <?php ini_set('include_path','/usr/local/xunsearch/sdk/php'); require 'lib/XS.php'; $xs = new XS('demo'); $search = $xs->search; // 搜索对象来自 XS 的属性 $query = '测试'; // 这里的搜索语句很简单,就一个短语 $search->setQuer ...
pheanstalk_worker.php <?php // Hopefully you're using Composer autoloading. // 定义 BASE_PATH set_time_limit(0); ini_set('memory_limit', '1024M'); define('BASE_PATH', __DIR__); // Autoload 自动载入 require BASE_PATH.'/vendor/autoload.php'; use Pheanstalk\Pheanstalk; $pheanstalk = ...

[转]Mysql优化

1、选择Percona或MariaDB版本的话,强烈建议启用thread pool特性,可使得在高并发的情况下,性能不会发生大幅下降。此外,还有extra_port功能,非常实用, 关键时刻能救命的。还有另外一个重要特色是 QUERY_RESPONSE_TIME 功能,也能使我们对整体的SQL响应时间分布有直观感受; 2、设置default-storage-engine=InnoDB,也就是默认采用InnoDB引擎,强烈建议不要再使用MyISAM引擎了,InnoDB引擎绝对可以满足99%以上的业务场景; 3、调整innodb_buffer_pool_size大小,如果是单实例且绝大多数是Inn ...
统计http状态码 cat www.log | awk '{a[$9]++} END{for(i in a)print i,"\t",a[i]}' > out.dat  访问IP分布 cat access.log | awk '{a[$1]++} END{for(i in a)print i,"\t",a[i]}' > out.dat   统计Linux下最常用的20条命令的shell history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[ ...
# !/bin/sh rm -fr /usr/local/cluster/7000/appendonly.aof /usr/local/cluster/7000/nodes-6379.conf rm -fr /usr/local/cluster/7001/appendonly.aof /usr/local/cluster/7001/nodes-6379.conf rm -fr /usr/local/cluster/7002/appendonly.aof /usr/local/cluster/7002/nodes-6379.conf rm -fr /usr/local/cluster ...
1. download the libssh2 package from http://libssh2.org, command as following: tar vxzf libssh2-1.4.2.tar.gz cd libssh2-1.4.2 ./configure make make install 2. download the php-ssh2 package from http://pecl.php.net/package/ssh2: tar vxzf ssh2-0.11.3 cd ssh2-0.11.3 phpize ./configure - ...

quick基础

-- 文件读取和json local json_str = cc.FileUtils:getInstance():getStringFromFile("game_data/prop_info.json") local json_value = json.decode(json_str)   -- 动画操作 local sprite2 = cc.Sprite:create("ui/attack_normal.png") sprite2:setPosition(cc.p(250,400)) self ...

sftp使用知识点

sftp如何连接特定端口 sftp -oPort=6003 user@host   sftp如何批量下载文件 mget dir/*
mysqldump --add-drop-table --extended-insert --force --log-error=error.log -h127.0.0.1 -uu -p123456 database_1 | ssh -C root@192.168.0.1 "mysql -h127.0.0.1 -uu2 -p123456 database_2"  
容陈旧,随着时间推移技术发展变化而变得不适用。为了防止误导新手,特本着与时俱进的精神写出此文,绝非对原文作者的不尊重。 1.使用MyISAM而不是InnoDB完全错误,反驳理由:首先原文说MyISAM是默认使用的,而实际上到了My ...
When you running a highload website with PHP-FPM via FastCGI, the following tips may be useful to you : ) 1. Compile PHP's modules as less as possible, the simple the best (fast); 2. Increas PHP FastCGI child number to 100 and even more. Sometime, 200 is OK! ( On 4GB memory server); 
show version(); // 版本 大于5.1 show variables like '%event%'; event_scheduler | OFF SET GLOBAL event_scheduler = ON; //开启计划任务 SELECT * FROM mysql.event\G //查看目前运行的计划任务 use test //先创建test数据库 CREATE TABLE aaa (t TIMESTAMP); CREATE EVENT e_test_insert ON SCHEDULE EVERY 1 SECOND DO INS ...

sed命令用法

sed命令用法 在匹配指定行插入新行 sed "/Lulu/i\i am new line" sed_result.log > sed_newline.log sed脚本文件执行附加文本 ./append.sed grade.log > sed_result.log 显示匹配到的行 sed -n '/J/p' grade.log 显示全部内容 sed -n '1,$p' grade.log 显示最后一行 sed -n '$p' grade.log 显示第1和第2行 sed -n '1,2p' grade.log 匹配 ...
写道 #!/bin/shread -p "Please keyin your ssh host:" -t 30 host_ipread -p "Please keyin your ssh user:" -t 30 usernameread -p "Please keyin your ssh pass:" -t 30 passwordread -p "Please keyin your sync table list,separated by spaces:" -t 30 table_listdatetime=`d ...
Global site tag (gtag.js) - Google Analytics