2018年

2018-10-06开始记录

十二月

2018-12-27

解析nginx日志,实时了解服务器的情况(类似于top)
https://github.com/lebinh/ngxtop

Nginx 简易教程
https://www.cnblogs.com/jingmoxukong/p/5945200.html

一篇信息搜集的文章
https://mp.weixin.qq.com/s/XGdeoQKjOkUFpc6HV3IfGw

开灯看暗网(概念讲的挺透彻的)
https://mp.weixin.qq.com/s/SzzEWdh5gaCkRUTr1EKZiw

便捷的漏洞镜像管理部署Web应用
https://github.com/phantom0301/VulCloud

Kafka与RabbitMQ(文章不错)
https://mp.weixin.qq.com/s/r8L-Nz_457xdsww2DdlqJw

360线上移动性能检测平台
https://github.com/Qihoo360/ArgusAPM

2018-12-26

发现了个性价比很高的数据库,中小公司不用蛋疼于多种NoSQL的混合开发了:(Start 7k)

ArangoDB是一个原生的多模型数据库,具有文档,图形和键值的灵活数据模型
https://github.com/LessChina/arangodb

最新SSR:https://ssrss.space/register?aff=986229

最新FQ参考源码:(golang)
https://github.com/lotapp/firefly-proxy

更新维基hosts:C:\Windows\System32\drivers\etc

# https://zh.wikibooks.org/wiki/突破网络审查#修改hosts文件
198.35.26.96 zh.wikipedia.org #中文维基百科
198.35.26.96 zh.m.wikipedia.org #中文维基百科移动版
198.35.26.96 zh-yue.wikipedia.org #粤文维基百科
198.35.26.96 wuu.wikipedia.org #吴语维基百科
198.35.26.96 zh.wikinews.org #中文维基新闻
198.35.26.96 ja.wikipedia.org #日文维基百科
198.35.26.96 ja.m.wikipedia.org #日文维基百科移动版

2018-12-25

SkyWalking的NetCore版仪表盘
https://github.com/OpenSkywalking/skywalking-netcore

类似于EventBus的分布式事务解决方案
https://github.com/dotnetcore/CAP

JetBrains全家桶破解思路(最新更新:2018-12-24)
https://www.cnblogs.com/dotnetcrazy/p/9711763.html

最适合Net开发人员的MySQL``IDE
https://www.cnblogs.com/dotnetcrazy/p/10172959.html

DataGrip基础教程
https://blog.csdn.net/u013870094/article/details/79460787

DataGrip像navicat一样导入导出表数据
https://blog.csdn.net/erxiaoouba/article/details/79554724

2018-12-24

对SQL进行优化和改写的自动化工具(小米开源)
https://github.com/lotapp/soar

HBase替代方案:Pegasus(小米开源)
https://github.com/lotapp/pegasus

滴滴 Elasticsearch 多集群架构实践
https://www.infoq.cn/article/SbfS6uOcF_gW6FEpQlLK

2018 年最值得关注的 10 个机器学习开源项目
https://www.infoq.cn/article/8u2DZBVI*2pp7Y39l1ak

2018-12-23

【开源】Bug管理系统(PHP)
https://github.com/lotapp/masterlab

CMS内容管理系统(NodeJS)
https://github.com/lotapp/DoraCMS

阿里巴巴开源的LoT系统
https://github.com/lotapp/AliOS-Things

博客园文章管理编辑器客户端
https://gitee.com/lotapp/cnblogs

一款优雅的中国风Android App(包括Server端)

https://github.com/lotapp/jianshi
如何在一天之内完成一款Android产品
https://www.jianshu.com/p/cf496fc408b2

基于svg图片生成的图标字体
https://github.com/uiw-react/icons

2018-12-20

解释Referer信息泄露的一篇文章
https://mp.weixin.qq.com/s/xFmepVSfOKIh_L-6GaltcA

正则小工具(图形演示整个匹配过程)

在线演示:https://jex.im/regulex
https://github.com/lotapp/regulex

Java架构师知识图谱参考
https://github.com/lotapp/architect-awesome

极客时间-从零开始学架构(PDF+音频)
链接: https://pan.baidu.com/s/1Z18zinechCefigAFO5s0xA 提取码: b7c3

2018-12-19

如何让nginx修改Response HTTP Header中的server的值
https://blog.csdn.net/caoshiying/article/details/78114315

Node包管理工具

  1. Nvm:https://github.com/creationix/nvm
  2. Yarn:https://yarnpkg.com/zh-Hans/

【推荐】Taro京东开源的多端统一框架小程序H5ReactNative
https://github.com/LessChina/taro

逆天点评:这个之前我有提到过最近百度小程序也比较火,大有超越微信小程序的趋势,这款也支持百度小程序和支付宝小程序了前端大一统早就是经常提的,Taro就是这一款开发框架(采用`React`语法标准,支持`JSX`和`TypeScript`)最重要的是有个强大的后盾~`京东`,而且这款开源的确是京东为数不多的良心之作了,希望不要和360一样,各自开源胎死腹中......相关链接:
https://taro.aotu.io
https://nervjs.github.io/taro
https://github.com/NervJS/awesome-taro
https://nervjs.github.io/taro/docs/README.html
https://juejin.im/book/5b73a131f265da28065fb1cdhttps://nerv.aotu.io
https://nervjs.github.io/docs京东前端团队:https://aotu.io
https://github.com/NervJS
https://github.com/o2team

小程序市场分析:https://baijiahao.baidu.com/s?id=1612578358728437062

2018-12-18

一步一步教你如何用Python做词云
https://www.cnblogs.com/ZaraNet/p/10136589.html

IdentityServer4

http://www.cnblogs.com/stulzq/p/8119928.html
https://www.cnblogs.com/FireworksEasyCool/category/1364487.html

Asp.net core WebApi 使用Swagger生成帮助页
https://www.cnblogs.com/suxinlcq/p/6757556.html

CSS系列——前端进阶之路:初涉Less
https://www.cnblogs.com/landeanfen/p/6047031.html

自己手动搭建SS优雅上网:http://blog.51cto.com/13589319/2125370

国外服务端:
pip install shadowsocks# `locale.Error: unsupported locale setting` 》》`export LC_ALL=C`ssserver -c json配置文件 -d startjson配置文件内容:
{
"server":"0.0.0.0",
"server_port":8000,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"自定义密码",
"timeout":300,
"method":"aes-256-cfb"
}
---
Linux客户端使用`Shadowsocks-qt5`即可:
https://github.com/shadowsocks/shadowsocks-qt5/releases/download/v3.0.1/Shadowsocks-Qt5-3.0.1-x86_64.AppImagesudo chomod +x Shadowsocks*

2018-12-17

图灵系列丛书203册
链接: https://pan.baidu.com/s/1-Ai-OXFyOU2D6IF9AjbSkg 密码: 6xk6

百度网盘客户端(Golang版本)
https://github.com/lotapp/BaiduPCS-Go
https://github.com/lotapp/baidupcs-web

PDF下载站

https://kgbook.com
http://www.pdfbook.cn

【推荐】牛津书虫-双语读物
链接:https://pan.baidu.com/s/1GA87KxEjk9ZhRqAQ_g67Fg 提取码:hs6n

【推荐】2018最新学而思小学奥数全套(49G)
链接:https://pan.baidu.com/s/1aRWXWrLDmcT1EP4djWD1Vw 提取码:ublz

2019初级会计
https://pan.baidu.com/s/1vwlbwooSlozsoeROAd-Fvw 提取码:u5ai

2018-12-16

NetCore招聘:
https://dotnet.microsoft.com/platform/customers

NetCore:人工智能聊天机器人框架

https://botsharp.readthedocs.io
https://github.com/dotnetcore/BotSharp

2018-12-15

【推荐】CUP基础库是百度开源的Python2基础库

https://github.com/lotapp/CUP
文档:https://cupdoc.iobusy.com
https://github.com/Baidu/CUP/wiki

Python 开发的守护进程
https://github.com/lotapp/supervisor

微信网页版 API 的 Go 实现
https://github.com/lotapp/wechat-go

Golang微信支付SDK
https://github.com/objcoding/wxpay

Facebook GraphQL 协议的 Go 语言版本
https://github.com/samsarahq/thunder

机器学习库
https://github.com/lotapp/awesome-machine-learning

JavaScript3D库three.js

Docs:https://threejs.org/docs/
Demo:https://threejs.org/examples/
https://github.com/mrdoob/three.js

200行实现的面部识别库
https://github.com/tehnokv/picojs

2018-12-14

微信小程序即时通讯
https://github.com/lotapp/wechat-im

神经网络与深度学习

https://nndl.github.io/
https://github.com/lotapp/nndl.github.io

ES6手册(在线:http://es6.ruanyifeng.com)
https://github.com/lotapp/es6tutorial

webpack学习demo
https://github.com/lotapp/webpack-demos

react学习demo
https://github.com/lotapp/react-demos

易搭建的自助Git服务(Golang)
https://github.com/lotapp/gitea

Java 性能监控
https://github.com/LinShunKang/MyPerf4J

2018-12-13

SQL 速查表
https://github.com/lotapp/quick-SQL-cheatsheet

Chrome 插件开发完整教程
https://github.com/lotapp/chrome-plugin-demo

Leetcode 题解及经典算法实现,实现语言包含 Python、Java、C++、JS
https://github.com/lotapp/awesome-algorithm

centos7 mysql数据库安装和配置
https://www.cnblogs.com/starof/p/4680083.html

重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
https://www.cnblogs.com/gumuzi/p/5711495.html

爱奇艺解析(Python)
https://github.com/ZSAIm/iqiyi-parser

找回 Node.js 里面那些遗失的 ES6 特性
http://taobaofed.org/blog/2016/01/07/find-back-the-lost-es6-features-in-nodejs/

2018-12-12

Python词云图案

在线工具:http://yciyun.com/一步一步教你如何用Python做词云
https://www.cnblogs.com/ZaraNet/p/10136589.html利用Python爬取微博数据生成词云图片实例代码
https://www.jianshu.com/p/6b84a9631f8a使用python实现个性化词云的方法
https://www.jb51.net/article/116346.htm利用Python把图片生成词云
https://blog.csdn.net/qq_42156420/article/details/83058442Python 分词及词云绘图
http://www.cnblogs.com/hzc2012/p/8277826.html

2018-12-09

jupyter notebook导出pdf并支持中文
https://www.jianshu.com/p/6b84a9631f8a

Linux下文件的三个时间(Atime,Mtime,Ctime)
http://www.cnblogs.com/MrListening/p/5793944.html

2018-12-05

Ubuntu解决dpkg returned an error code (1)

https://blog.csdn.net/qq_31617637/article/details/72881105
https://jingyan.baidu.com/article/647f0115d248ae7f2148a8a3.html

2018-12-02

Linux软件包中心
https://pkgs.org/

nmp包的CDN:
https://unpkg.com/

2018-12-01

知乎社区核心业务 Golang 化实践
https://zhuanlan.zhihu.com/p/48039838

Linux中安装Cisco Packet Tracer

https://linux.cn/article-5576-1.html
https://blog.csdn.net/qq_37935670/article/details/80479654
https://blog.csdn.net/qq_35882901/article/details/77652571软件下载地址:
链接:http://pan.baidu.com/s/1dFeqLRb 密码:d40z
备用链接:https://pan.baidu.com/s/1akAzm4-WDm7wbifq_3n13g 提取码: dfw7

todo

十一月

2018-11-30

wxpy~微信常用模块
https://wxpy.readthedocs.io/zh/latest/

2018-11-29

Youtube上的软件开发视频集合
https://dev.tube/

动画演示算法
https://www.codelike.in/animation/binary-search-tree/

外国学习网站:
https://tutorialedge.net

使用WebAssembly和Go编写前端Web框架

https://github.com/lotapp/oak
http://www.cnblogs.com/baizx/p/9602581.html

Golang模块案例
https://github.com/go-modules-by-example/index

Github时间裤子
https://githubtimeline.xyz

X-Frame-Options: SAMEORIGIN的说明
https://www.cnblogs.com/trance/p/4645486.html

页面的返回头被设置 X-Frame-Options SAMEORIGIN ,只能被同源的iframe 引用。跨域名的iframe 没法显示了

2018-11-28

Linux工具大全:(使用文档)

https://linuxtools-rst.readthedocs.io/zh_CN/latest/index.html

《动手学深度学习》

PDF:
https://zh.gluon.ai/gluon_tutorials_zh.pdfGitHub
https://github.com/lotapp/d2l-zh在线阅读:
https://zh.gluon.ai/toc.html
https://zh.diveintodeeplearning.org论坛:
https://discuss.gluon.ai视频:
https://discuss.gluon.ai/t/topic/753
https://space.bilibili.com/209599371/channel/detail?cid=23541

2018-11-27

手势验证
https://www.vaptcha.com

Python高性能框架~Japronto(每秒处理 120 万次 HTTP 请求)
https://blog.csdn.net/sinat_38682860/article/details/72862220

2018-11-26

根据 JSON 文件快速生成 API 的 Web 服务端
https://github.com/lotapp/localroast

算法练习网站

https://oi-wiki.org
https://github.com/lotapp/OI-wiki

2018-11-25

老外数学讲解:
https://hadrienj.github.io/deep-learning-book-series-home

易经卦象的二维码生成器:(源码)
https://github.com/lotapp/Nodle-I-Ching

网页音频格式解码的 JS 库
https://github.com/lotapp/howler.js

基于TensorFlow.js的封装库:ml5js

https://github.com/lotapp/ml5-library
https://github.com/lotapp/ml5-examples

二维码生成原理:
https://www.nayuki.io/page/creating-a-qr-code-step-by-step

2018-11-24

React入门教程
http://huziketang.mangojuice.top/books/react/

开源网络钓鱼工具包
https://github.com/lotapp/gophish

JS敏感词过滤库
https://github.com/lotapp/fastscan

2018-11-14

Docker仓库-国内版
https://dev.aliyun.com/

编译:Babel将ES6转码为ES5
https://www.jianshu.com/p/8a8f7b0f887a

临时邮箱开源版:https://mailsac.com
https://github.com/lotapp/mailsac
https://github.com/lotapp/forsaken-mail

2018-11-13

VsCode中使用Emmet神器快速编写HTML代码
http://www.cnblogs.com/summit7ca/p/6944215.html

IntelliJ IDEA 注册码

http://idea.lanyus.com
https://www.cnblogs.com/dotnetcrazy/p/9950762.html

开课吧Web全栈架构师二期
https://pan.baidu.com/s/1-KyqGZOR5O_BxTXR0z41BA 提取码:bj34

2018-11-12

文章

Go线程和Java线程的对比
https://www.infoq.cn/article/a-million-go-routines-but-only-1000-java-threads

为什么要使用GraphQL?

对于客户端而言,开箱即用的GraphQL API实现将具有比标准REST API更好的性能
https://honest.engineering/posts/why-use-graphql-good-and-bad-reasons

密码学演变-含Python代码
http://davidlowryduda.com/a-brief-notebook-on-cryptography

Nginx配置IPv6
https://bubblin.io/blog/ipv6-nginx

裤子

亚马逊所有IP地址
https://ip-ranges.amazonaws.com/ip-ranges.json

资源

新网盘搜索:https://www.aisouziyuan.com

前端面试题:http://scriptoj.mangojuice.top

gRPC Web:Web程序能够直接与后端gRPC服务通信(不需要HTTP服务器|替代REST的gRPC的Javascript库包)

https://www.npmjs.com/package/grpc-web
https://www.infoq.cn/article/2018%2F10%2Fpublished-gRPC-Web
https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md

图解HTTPS:https://tls.ulfheim.net

初音未来音乐站点源码和演示:
https://github.com/lotapp/mikutap
http://github.lesschina.com/life/music/TweenMax:高性能动画库
https://www.tweenmax.com.cn

又一免费CDN:https://css.loli.net

微软在线工具:将手绘草图转成HTML代码
https://sketch2code.azurewebsites.net

密码强度测试库(多语言支持):
https://github.com/dropbox/zxcvbn

将网页上的外联SVG图像,变为内嵌的SVG图像,从而使得全局的CSS样式文件可以对这个图像生效
https://github.com/iconfu/svg-inject

科幻风格React UI组件库
https://github.com/arwesjs/arwes

一本英文的纯数学教材,免费下载,从简单的自然数讲起,包括代数、数论、集合运算、概率和微积分等

https://infinitedescent.xyz
https://infinitedescent.xyz/dl/infdesc-a4.pdf

电子图书馆:http://m.ndlib.cn

【轻量级】基于Arch Linux的图形化系统:manjaro

家里的低配电脑可以走起了,最低内存500M左右
https://manjaro.org/get-manjaro

2018-11-07

小技巧:

  • 浏览器强制更新(不使用浏览器缓存):Ctrl+F5
  • 触摸屏使用心得:(未必通用)
    1. 鼠标右击:双指一起单击
    2. 鼠标滚轮:一指长按,一指起移动(上下)

Python模块导航:

  1. 官方:https://docs.python.org/3/library/index.html
  2. 其他:Python Module of the Week
    1. Py3:https://pymotw.com/3
    2. Py2:https://pymotw.com/2
  3. 解决方案:Python and NetCore
    • https://github.com/lesschina

Python博客(外国):https://doughellmann.com/blog

Golang博客(基础):http://www.hellokang.net

Python爬虫系列:https://www.cnblogs.com/zhaof/category/1007686.html

2018-11-06

你可以用Python玩任何街机游戏
https://mp.weixin.qq.com/s/uSbb5hFvjY0VuizQd5gc_A

IIS部署python运行环境
https://www.cnblogs.com/shenh/p/8028081.html

从壹开始前后端分离(NETCore2.0 + Vue2.0 + AOP)
https://www.cnblogs.com/laozhang-is-phi/p/9495618.html


十月

2018-10-31

从最新时间可以看出,当Android开始收费时,Ubuntu Touch又有想法了
http://cdimage.ubuntu.com/ubuntu-touch/

ubports-installer:
https://ubuntu-touch.io/zh_CN/get-ut

Ubuntu-Touch支持列表:
https://wiki.ubuntu.com/Touch/Devices

小米ROM:
https://pan.baidu.com/s/1dEZDZbj

手机变PC:给魅族PRO 5刷Ubuntu Touch系统 | 给Ubuntu Touch安装桌面软件
https://www.ithome.com/html/android/345898.htm
https://www.ithome.com/html/android/346068.htm


手机论坛-小米专题:
https://forum.xda-developers.com/xiaomi

Linux下刷机参考:
http://www.miui.com/thread-6193481-1-1.html

sudo apt-get install android-tools-adb android-tools-fastboot

sudo sh flash_all.sh

在线便利贴:
https://trello.com

2018-10-28

资源

Linux公社FTP共享资源:https://linux.linuxidc.com

开源堡垒机:https://github.com/jumpserver/jumpserver
文章介绍:https://www.linuxidc.com/Linux/2018-04/151673.htm

Tails Linux:https://tails.boum.org/install/download/index.en.html
文章介绍:https://linux.cn/article-5649-1.html

可汗学院:https://zh.khanacademy.org

文章

使用Python2脚本实现MySQL误操作的快速回滚
https://www.linuxidc.com/Linux/2018-05/152199.htm

#!/bin/env python
# -*- coding:utf-8 -*-import os,sys,re,getopt
import MySQLdbhost = '127.0.0.1'
user = ''
password = ''
port = 3306
start_datetime = '1971-01-01 00:00:00'
stop_datetime = '2037-01-01 00:00:00'
start_position = '4'
stop_position = '18446744073709551615'
database = ''
mysqlbinlog_bin = 'mysqlbinlog -v'
binlog = ''
fileContent = ''
output='rollback.sql'
only_primary = 0# ----------------------------------------------------------------------------------------
# 功能:获取参数,生成相应的binlog解析文件
# ----------------------------------------------------------------------------------------
def getopts_parse_binlog():global hostglobal userglobal passwordglobal portglobal fileContentglobal outputglobal binlogglobal start_datetimeglobal stop_datetimeglobal start_positionglobal stop_positionglobal databaseglobal only_primarytry:options, args = getopt.getopt(sys.argv[1:], "f:o:h:u:p:P:d:", ["help","binlog=","output=","host=","user=","password=","port=","start-datetime=", \"stop-datetime=","start-position=","stop-position=","database=","only-primary="])except getopt.GetoptError:print "参数输入有误!!!!!"options = []if options == [] or options[0][0] in ("--help"):usage()sys.exit()print "正在获取参数....."for name, value in options:if name == "-f" or name == "--binlog":binlog = valueif name == "-o" or name == "--output":output = valueif name == "-h" or name == "--host":host = valueif name == "-u" or name == "--user":user = valueif name == "-p" or name == "--password":password = valueif name == "-P" or name == "--port":port = valueif name == "--start-datetime":start_datetime = valueif name == "--stop-datetime":stop_datetime = valueif name == "--start-position":start_position = valueif name == "--stop-position":stop_position = valueif name == "-d" or name == "--database":database = valueif name == "--only-primary" :only_primary = valueif binlog == '' :print "错误:请指定binlog文件名!"usage()if user == '' :print "错误:请指定用户名!"usage()if password == '' :print "错误:请指定密码!"usage()if database <> '' :condition_database = "--database=" + "'" + database + "'"else:condition_database = ''print "正在解析binlog....."fileContent=os.popen("%s %s  --base64-output=DECODE-ROWS --start-datetime='%s' --stop-datetime='%s' --start-position='%s' --stop-position='%s' %s\|grep '###' -B 2|sed -e 's/### //g' -e 's/^INSERT/##INSERT/g' -e 's/^UPDATE/##UPDATE/g' -e 's/^DELETE/##DELETE/g' " \%(mysqlbinlog_bin,binlog,start_datetime,stop_datetime,start_position,stop_position,condition_database)).read()#print fileContent# ----------------------------------------------------------------------------------------
# 功能:初始化binlog里的所有表名和列名,用全局字典result_dict来储存每个表有哪些列
# ----------------------------------------------------------------------------------------
def init_col_name():global result_dictglobal pri_dictglobal fileContentresult_dict = {}pri_dict = {}table_list = re.findall('`.*`\\.`.*`',fileContent)table_list = list(set(table_list))#table_list 为所有在这段binlog里出现过的表print "正在初始化列名....."for table in table_list:sname = table.split('.')[0].replace('`','')tname = table.split('.')[1].replace('`','')#连接数据库获取列和列idtry:conn = MySQLdb.connect(host=host,user=user,passwd=password,port=int(port))cursor = conn.cursor()cursor.execute("select ordinal_position,column_name \from information_schema.columns \where table_schema='%s' and table_name='%s' " %(sname,tname))result=cursor.fetchall()if result == () :print 'Warning:'+sname+'.'+tname+'已删除'#sys.exit()result_dict[sname+'.'+tname]=resultcursor.execute("select ordinal_position,column_name   \from information_schema.columns \where table_schema='%s' and table_name='%s' and column_key='PRI' " %(sname,tname))pri=cursor.fetchall()#print pripri_dict[sname+'.'+tname]=pricursor.close()conn.close()except MySQLdb.Error, e:try:print "Error %d:%s" % (e.args[0], e.args[1])except IndexError:print "MySQL Error:%s" % str(e)sys.exit()#print result_dict#print pri_dict# ----------------------------------------------------------------------------------------
# 功能:拼凑回滚sql,逆序
# ----------------------------------------------------------------------------------------
def gen_rollback_sql():global only_primaryfileOutput = open(output, 'w')#先将文件根据'--'分块,每块代表一个sqlarea_list=fileContent.split('--\n')#逆序读取分块print "正在开始拼凑sql....."for area in area_list[::-1]:#由于一条sql可能影响多行,每个sql又可以分成多个逐条执行的sqlsql_list = area.split('##')#先将pos点和timestamp传入输出文件中for sql_head in sql_list[0].splitlines():sql_head = '#'+sql_head+'\n'fileOutput.write(sql_head)#逐条sql进行替换更新,逆序for sql in sql_list[::-1][0:-1]:try:if sql.split()[0] == 'INSERT':rollback_sql = re.sub('^INSERT INTO', 'DELETE FROM', sql, 1)rollback_sql = re.sub('SET\n', 'WHERE\n', rollback_sql, 1)tablename_pos = 2table_name = rollback_sql.split()[tablename_pos].replace('`', '')# 获取该sql中的所有列col_list = sorted(list(set(re.findall('@\d+', rollback_sql))))# 因为第一个列前面没有逗号或者and,所以单独替换rollback_sql = rollback_sql.replace('@1=', result_dict[table_name][0][1]+'=')for col in col_list[1:]:i = int(col[1:]) - 1rollback_sql = rollback_sql.replace(col+'=', 'AND ' + result_dict[table_name][i][1]+'=',1)# 如果only_primary开启且存在主键,where条件里就只列出主键字段if int(only_primary) == 1 and pri_dict[table_name] <> ():sub_where = ''for primary in pri_dict[table_name]:primary_name = primary[1]for condition in rollback_sql.split('WHERE', 1)[1].splitlines():if re.compile('^\s*'+primary_name).match(condition) or re.compile('^\s*AND\s*'+primary_name).match(condition):sub_where = sub_where + condition + '\n'sub_where = re.sub('^\s*AND', '', sub_where, 1)rollback_sql = rollback_sql.split('WHERE', 1)[0] + 'WHERE\n' + sub_whereif sql.split()[0] == 'UPDATE':rollback_sql = re.sub('SET\n', '#SET#\n', sql, 1)rollback_sql = re.sub('WHERE\n', 'SET\n', rollback_sql, 1)rollback_sql = re.sub('#SET#\n', 'WHERE\n', rollback_sql, 1)tablename_pos = 1table_name = rollback_sql.split()[tablename_pos].replace('`', '')# 获取该sql中的所有列col_list = sorted(list(set(re.findall('@\d+', rollback_sql))))# 因为第一个列前面没有逗号或者and,所以单独替换rollback_sql = rollback_sql.replace('@1=', result_dict[table_name][0][1] + '=')for col in col_list[1:]:i = int(col[1:]) - 1rollback_sql = rollback_sql.replace(col+'=', ',' + result_dict[table_name][i][1]+'=', 1).replace(col+'=','AND ' +result_dict[table_name][i][1]+'=')# 如果only_primary开启且存在主键,where条件里就只列出主键字段if int(only_primary) == 1 and pri_dict[table_name] <> ():sub_where = ''for primary in pri_dict[table_name]:primary_name = primary[1]for condition in rollback_sql.split('WHERE', 1)[1].splitlines():if re.compile('^\s*' + primary_name).match(condition) or re.compile('^\s*AND\s*'+primary_name).match(condition):sub_where = sub_where + condition + '\n'sub_where = re.sub('^\s*AND', '', sub_where, 1)rollback_sql = rollback_sql.split('WHERE', 1)[0] + 'WHERE\n' + sub_whereif sql.split()[0] == 'DELETE':rollback_sql = re.sub('^DELETE FROM', 'INSERT INTO', sql, 1)rollback_sql = re.sub('WHERE\n', 'SET\n', rollback_sql, 1)tablename_pos = 2table_name = rollback_sql.split()[tablename_pos].replace('`', '')# 获取该sql中的所有列col_list = sorted(list(set(re.findall('@\d+', rollback_sql))))# 因为第一个列前面没有逗号或者and,所以单独替换rollback_sql = rollback_sql.replace('@1=', result_dict[table_name][0][1] + '=')for col in col_list[1:]:i = int(col[1:]) - 1rollback_sql = rollback_sql.replace(col+'=', ',' + result_dict[table_name][i][1]+'=',1)rollback_sql = re.sub('\n$',';\n',rollback_sql)#print rollback_sqlfileOutput.write(rollback_sql)except IndexError,e:print "Error:%s" % str(e)sys.exit()print "done!"def usage():help_info="""==========================================================================================
Command line options :--help                  # OUT : print help info-f, --binlog            # IN  : binlog file. (required)-o, --outfile           # OUT : output rollback sql file. (default 'rollback.sql')-h, --host              # IN  : host. (default '127.0.0.1')-u, --user              # IN  : user. (required)-p, --password          # IN  : password. (required)-P, --port              # IN  : port. (default 3306)--start-datetime        # IN  : start datetime. (default '1970-01-01 00:00:00')--stop-datetime         # IN  : stop datetime. default '2070-01-01 00:00:00'--start-position        # IN  : start position. (default '4')--stop-position         # IN  : stop position. (default '18446744073709551615')-d, --database          # IN  : List entries for just this database (No default value).--only-primary          # IN  : Only list primary key in where condition (default 0)Sample :shell> python binlog_rollback.py -f 'mysql-bin.000001' -o '/tmp/rollback.sql' -h 192.168.0.1 -u 'user' -p 'pwd' -P 3307 -d dbname
=========================================================================================="""print help_infosys.exit()if __name__ == '__main__':getopts_parse_binlog()init_col_name()gen_rollback_sql()

Linux终端复用神器-Tmux使用梳理
https://www.cnblogs.com/kevingrace/p/6496899.html

把Ubuntu 18.04改造成Windows主题界面
https://www.linuxidc.com/Linux/2018-09/153973.htm

CentOS 7.3编译安装Nginx 1.12.2
https://www.linuxidc.com/Linux/2018-09/154437.htm

用Prometheus细化Nginx监控
http://blog.51cto.com/xujpxm/2080146

Debian 9.2安装Zabbix 3.4.2
https://www.linuxidc.com/Linux/2018-03/151338.htm

Ubuntu 16.04下JDK+Hadoop+Spark环境搭建
https://www.linuxidc.com/Linux/2018-05/152564.htm

Vagrant创建Jenkins构建环境|用VagrantAnsible搭建持续交付平台
https://www.cnblogs.com/davenkin/p/vagrant-jenkins-master-slave.html

OpenStack Ironic实现裸机部署
https://blog.csdn.net/u010281209/article/details/81611707

CentOS 7下部署.NET Core2.0+Nginx+Supervisor+MySQL环境
https://www.linuxidc.com/Linux/2018-04/151794.htm

Java事务系列
https://www.cnblogs.com/davenkin/tag/事务/

2018-10-24

盘多多:
http://www.panduoduo.net
http://pdd.19mi.net/go/数字编号

新网盘搜索:https://pan.09l.me

个人博客

Python

https://www.dataivy.cn

NetCore

https://www.cnblogs.com/jiekzou

运维

https://www.howtoing.com

站桩

http://blog.sina.cn/dpool/blog/ab4008zhanghua

图书影音

http://mebook.cc

http://orzbook.com

http://www.shuwu.mobi

http://hotbaidu.com

http://www.java51.com

http://www.jiuaijsj.com

http://www.jqhtml.com/down

http://www.jiuaijsj.com/books

博客PDF:
http://www.lanqibing.com
https://www.cnblogs.com/mebook
http://blog.sina.com.cn/s/articlelist_5163237871_0_1.html

杂项搜索:http://www.xwood.net

在线转换

在线Azw3转PDF(中文识别能力欠佳)

http://www.alltoall.net/azw3_pdf

https://cloudconvert.com/azw3-to-pdf

在线Epub转PDF(中文识别能力欠佳)

https://convertio.co/zh/epub-pdf

https://cloudconvert.com/epub-to-pdf

https://www.ofoct.com/ebooktool/zh/epub-to-pdf

推荐:https://www.aconvert.com/cn/pdf

2018-10-22

面试题:

https://www.nowcoder.com
https://www.jiuzhang.com
https://leetcode.com
https://leetcode-cn.com
https://www.cnblogs.com/grandyang/p/4606334.html

树莓派搭建NAS
https://opensource.com/article/18/7/network-attached-storage-Raspberry-Pi

2018-10-15

书籍

Python Cookbook 3:
https://python3-cookbook.readthedocs.io/zh_CN/latest/index.html

Twisted:https://likebeta.gitbooks.io/twisted-intro-cn/content/zh

Python核心编程:https://wizardforcel.gitbooks.io/core-python-2e/content

Python编程风格:
https://zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/contents

工具

百度免登录下载:https://www.speedpan.com

谷歌助手:http://googlehelper.net

2018-10-10

免费SSL:https://zerossl.com

临时文件:https://cp.ifval.com

谷歌插件:https://chrome-extension-downloader.com

知识产权查询:https://www.qccip.com

影视在线:http://www.dybee.co

台湾影音:https://www.chocotv.com.tw

英语语法纠正:
https://www.gingersoftware.com/grammarcheck
https://www.nounplus.net/grammarcheck/cn
https://virtualwritingtutor.com
http://www.hemingwayapp.com
插件1:https://www.gingersoftware.com
插件2:https://www.grammarly.com

AI人工智能图片放大:https://bigjpg.com

视频下载:https://video-get.com/
人体浏览器:https://www.zygotebody.com

设计师素材:
https://pngtree.com
http://www.sucaidao.com

新加坡设计:http://webneel.com

新加坡资讯:https://www.toggle.sg/zh

新加坡房产:https://www.propertyguru.com.sg


2018-10-08

源码参考

自托管的一次性邮件服务
https://github.com/lotapp/forsaken-mail
临时邮箱Demo:http://forsaken.somecolor.cc:3000/

PicGo - 免费开源的图片上传与管理工具
https://github.com/Molunerfinn/PicGo

工具小记

云展网 - 将 PDF 文档转换成在线 3D 翻页画册
https://www.yunzhan365.com
【用户名和密码:netcore@maildu.de】
http://www.yunzhan365.com/login.php?i=mkqsmG
电子书:https://www.yunzhan365.com/explore/

坚果云 - 跨平台文件同步网盘
https://www.jianguoyun.com/s/downloads

免费网盘:https://www.multcloud.com

百度网盘:https://www.leiyun.org

EverSync - 免费跨浏览器书签收藏夹同步/备份工具
https://www.everhelper.me

蒲公英 – 让在异地的两台电脑组成局域网
https://pgy.oray.com

IP盒子(提供公网地址)
https://www.ipv4.me/

上海大学开源镜像站
https://mirrors.shu.edu.cn

在PC搭建OpenWRT软路由
https://www.cnblogs.com/loveyan1314/p/7820222.html


2018-10-06

Python相关的Github:
https://github.com/Python3WebSpider
https://github.com/chenjiandongx/awesome-asyncio-cn

Python相关的博客:
http://chenjiandongx.com
https://zhu327.github.io/post
论坛:https://pythontab.com

TCP协议参考:
https://www.cnblogs.com/wcd144140/category/1313090.html

MySQL性能测试工具mysqlslap:
https://www.cnblogs.com/fjping0606/p/5853325.html

转载于:https://www.cnblogs.com/dotnetcrazy/p/10262245.html

2018年日常小计汇总相关推荐

  1. 大数据学习日常小练习题汇总收纳

    仅供学习交流使用 一.选择题 1.下面哪个程序负责 HDFS 数据存储. A.NameNode B.Jobtracker C.Datanode D.secondaryNameNode 答案:C 2.H ...

  2. 日常小问题汇总(1)

    文章目录 1.ubuntu桌面设置没反应 1.ubuntu桌面设置没反应 重新安装Ubuntu桌面 sudo apt-get install ubuntu-desktop

  3. 报表中小计汇总总计在代码实现

    报表中小计汇总总计在代码实现 在财务系统不免又复杂的报表,用SQL很难实现,而且现的特别臃肿,下面是小计汇总总计实现代码,有更好的方法可以回复我. 构建一个用户对象 package com.zlp.D ...

  4. ElementUI中el-table在表格最下方添加一列汇总小计行

    场景 el-table中的每列显示的是数字,需要在表格的最下面一行添加汇总行,计算每列的总和. el-table自带是否显示汇总行这个属性. 注: 博客: https://blog.csdn.net/ ...

  5. pandas实现分类汇总--小计,总计

    有一批数据需要分类汇总和总计,看了一下pandas的groupby,可以实现.具体思路:先分组,分组后计算改分类的汇总小计,然后对dataframe进行拼接:分类汇总计算好了之后,计算总体的汇总,然后 ...

  6. 销售额总和的分类汇总计算机操作,销售数据excel表格分类-如何在EXCEL表格中按类别小计?...

    如何在EXCEL表格中按类别小计? EXCEL中把数据分类步骤如下: 1.在产品销售情况表中,完成对各产品销售额总和的分类汇总,汇总结果显示在数据下方. 2.选择数据--分类汇总. 3.得到分类汇总对 ...

  7. oralce rollup 小计合计_总计与小计–WITH ROLLUP

    rollup:汇总 在GROUP后加WITH ROLLUP来实现总计与小计,它会对每次分组的结果进行ROLLUP操作,产生汇总的结果,显示在行下. 在显示的时候可用GROUPING来判断当天是数据行还 ...

  8. ALV标准的分类小计功能

    添加字段的时候如下就可以实现了: CLEAR LIT_FCAT. LIT_FCAT-FIELDNAME = 'MENGE'. "需要汇总的字段 LIT_FCAT-REF_TABNAME = ...

  9. 计算机小组作品,计算机兴趣小组小作品汇总.doc

    计算机兴趣小组小作品汇总 计算机兴趣小组小作品汇总 在经过一学年春雨般的孕育下,计算机兴趣小组恰似一颗蓓蕾慢慢张开了花瓣,开始迎接朝阳的洗礼.在计科院团总支学生会的领导和大力支持下,计算机兴趣小组终于 ...

最新文章

  1. 关于Android H5混合开发遇到的问题
  2. 【OpenGL】二十二、OpenGL 光照效果 ( 模型准备 | 光照设置 | 启用光照 | 启用光源 | 设置光源位置 | 设置光照参数 | 设置环境光 | 设置反射材质 | 设置法线 )
  3. 【Linux】20.shell脚本 检测是否 ping 通
  4. Qt 运用鼠标绘制多边形
  5. 【C语言】第七章 模块化与函数 题解
  6. 3D Slicer源代码编译与调试
  7. MessageQueue的使用方法(二)
  8. easyexcel导入时读不到数据_easyexcel读取任意表格以及使用中的坑
  9. Java Jackson
  10. Android——Android Studio导入SlidingMenu类库的方法
  11. 统计学习方法--提升方法adaBoost算法(集成学习)
  12. 大型项目用python吗_在大型项目上,Python 是个烂语言吗?
  13. HTML5 学习准备1
  14. Servlet原理解析
  15. 毕业设计之甘特图制作
  16. 环境工程微生物学练习题
  17. Horner法则(霍纳法则)及其C语言描述
  18. 企业微信应用获取code
  19. 春节做的2021年终总结
  20. VS Code中打开工作区设置josn文件

热门文章

  1. 正确率、召回率、F值例子
  2. 二分(二分查找,二分搜索)
  3. [Neck] 空间金字塔池化【池化策略】(Space Pyramid Pool, SPP)模块和路径聚合网络【增强】(Path Aggregation Network, PANet)的结构
  4. 广州大学学生实验报告,数据结构实验,二叉树的操作与实现
  5. 腾讯新闻php面试题,腾讯PHP面试题及参考答案
  6. 专升本——非谓语动词
  7. 一阶电路实验报告心得_电路实验心得体会
  8. 详细Ubuntu系统下搭建Hadoop完全分布式
  9. pytorch创建自己的数据集(分类任务)
  10. 依赖倒转原则和里氏代换原则详解