This file contains 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
DELIMITER ;; | |
CREATE DEFINER=`root`@`%` PROCEDURE `proc_update`(in type int,in start int,in end int) | |
begin | |
set @start=start; | |
set @end=end; | |
while @start<@end | |
do | |
update tbl_material set file_type = type where id = @start; | |
set @start=@start+1; | |
end while; |
This file contains 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 | |
lessonId=(1 2 3 4 5 6 7 8 9 10) | |
for id in ${lessonId[*]}; | |
do | |
find ./$id -type f -not \( -name 'challenge.html' -or -name 'receive.html' -or -name 'reward.html' -or -name 'story.html' -or -name 'task.html' \) -delete | |
find . -type d -not \( -name 'challenge' -or -name 'receive' -or -name 'reward' -or -name 'story' -or -name 'task' \) -delete | |
zip -r $id.zip $id | |
done | |
find . -type d \( -name 'libs' -o -name 'node_modules' \) -exec rm -rf {} \; |
This file contains 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 | |
read lesson | |
./qshell_darwin_amd64 listbucket [bucket name] $lesson/ filelist.log | |
egrep -o '.*\.(png|jpg|js|mp4|an|html)' filelist.log > test.txt | |
sed 's/^/http:\/\/7xq5ra.com2.z0.glb.qiniucdn.com\/&/g' test.txt > refresh.log | |
./qshell_darwin_amd64 batchrefresh refresh.log |
This file contains 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
Mozilla/5.0wechat MicroMessenger (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 |
This file contains 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
function uploadUserAvatar() { | |
var cdnUploadUrl = "http://up.qiniu.com"; | |
getToken(uploadFile); | |
} | |
function getToken(callback) { | |
$.ajax({ | |
url: apiServer+'/program/cdn/upload/token', | |
type:"get", | |
success: function(data) { |
This file contains 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
find . -name .DS_Store -exec rm -rf {} \; |
This file contains 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
var startTime = Date.parse(new Date("2016 02-01"))/1000; | |
var endTime = Date.parse(new Date("2016 02-16"))/1000; | |
db.getCollection('sqllogs').find( | |
{$and:[{"create_time":{$lt:endTime}},{"create_time":{$gt:startTime}}, | |
{"content":/update.*praise_times.*35167.*/i}]}).sort({"create_time":1}) |
This file contains 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
create_time时间格式 | |
SELECT DATE_FORMAT(create_time,'%Y%u') weeks,COUNT(id) COUNT FROM role GROUP BY weeks; | |
SELECT DATE_FORMAT(create_time,'%Y%m%d') days,COUNT(id) COUNT FROM role GROUP BY days; | |
SELECT DATE_FORMAT(create_time,'%Y%m') months,COUNT(id) COUNT FROM role GROUP BY months | |
create_time时间戳格式 |
This file contains 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
process.on('uncaughtException', function(err) { | |
//do something | |
fs.appendFile("E:\\Work\\codemao\\code\\node\\electron-x32\\resources\\1.txt", err.stack, function(err1){ | |
}); | |
}); |
This file contains 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
taskkill /F /im frontpg.exe |
OlderNewer