Skip to content

Instantly share code, notes, and snippets.

@dolt131943
dolt131943 / win_mysql_jdbc_timezone_err.md
Created December 2, 2017 02:11
Windwos Mysql 5.7.x Timezone error when connect with JDBC

Env: Windows 10 Mysql 5.7.x Jdk1.8.x Mysql Connector Java 6.0.5

ERROR:

mysql java.sql.SQLException: The server time zone value ????? is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

@dolt131943
dolt131943 / nwjs-v0.14.7-no-cache.md
Created October 19, 2017 03:58
nwjs禁止缓存处理
  1. 在nwjs启动时清空缓存;
let gui = require('nw.gui');
  let tray;

  gui.App.clearCache();
  1. HTTP服务器返回添加禁止缓存标识;
@dolt131943
dolt131943 / nwjs-v0.14.7-only-show-english.md
Created September 27, 2017 11:32
nwjs打包app,v0.14.7非SDK版本都是显示英文问题

使用nwjs 0.14.7 打包app, 基于windows XP 中文操作系统.

发现界面上的一些默认的提示都是英文的,例如输入框的必填提示,而不是使用系统对应的中文。

后来使用SDK打包发现没有这个问题,能够使用系统的语言进行对应提示。

后面发现了应用下面的locales目录,SDK下有各种语言的,而非SDK版本,只有en-US的版本。

将SDK里的locales的zh-CN文件拷到非SDK版本打出来的应用里,可以显示出对应的中文提示。

@dolt131943
dolt131943 / redis_change_dump_dir.md
Created September 24, 2017 06:50
redis更改快照dump目录问题,redis change snapshot dump dir error.

Ubuntu想更改redis快照保存目录,打开/etc/redis/redis.conf,修改了dir为新的目录. 重启服务后,发现报错,保存数据失败.

进入redis-cli

config get dir save

提示ERR

@dolt131943
dolt131943 / crash_after_win10_patch_update.md
Last active September 16, 2017 15:37
2017/09/13 升级了Windows10 1705最新补丁包后系统出现休眠或睡眠唤醒时会蓝屏(即系统故障直接重启)的问题.

通过卸载相应的补丁包解决了此问题.暂时准备等下个补丁包出,或者未来直接升级创新者补丁包. 另外我的机器比较老旧了,开始还以为硬件问题.不过通过比对也确实有可能是硬件驱动导致了这样类蓝屏的结果.

uninstall latest patch update then this problem resolved.

相关信息:

OS Name: Microsoft Windows 10 专业版

@dolt131943
dolt131943 / winXpSamba4.5.md
Created September 16, 2017 01:03
upgrade to Debian 9 Samba 4.5.8 Win XP unable access the samba share. alway pop up auth info input dialog.

升级到或安装了Debian9,Samba升级到了4.5.8。发现Ubuntu能用的Samba共享无法被WinXp使用,也无法被我的一些智能设备识别。

经过分析研究,估计各种尝试了有8小时之久,原因很简单,通过问题分析找到可能原因,同时在Man smb.conf里看到相关选项的说明,最后最简单的方案就是下面这句:

ntlm auth (G)

           This parameter determines whether or not smbd(8) will attempt to authenticate users using the NTLM encrypted password response. If disabled, either the lanman
           password hash or an NTLMv2 response will need to be sent by the client.
@dolt131943
dolt131943 / spring-boot-tomcat-hangup-SecureRandom.md
Last active August 16, 2017 11:21
SpringBoot启动内嵌Tomcat时执行业务在取Session卡住-SecureRandom

SpringBoot内嵌Tomcat时执行业务在取Session卡住-与SecureRandom有关

问题

SpringBoot内嵌Tomcat启动业务后,业务请求时挂住

解决方案

使用java -jar -Djava.security.egd=file:/dev/./urandom 来指定生成器。

@dolt131943
dolt131943 / captureWithFiddler.md
Last active May 26, 2016 02:14
基于Fiddler来抓取Android Apk的HTTP/HTTPS数据包

基于Fiddler来抓取Android Apk的HTTP/HTTPS数据包

步骤

电脑端

  1. 安装Fiddler;
  2. 启用允许远程连接;
  3. 启用HTTPS监听;
after update to Win 10 , to start genymotion virtual device is fail.
the shown alert msg is "Could not connect to virtual device".
thought goole and try, the final solution is:
open virtualbox and then delete all HOST-ONLY network adapter.
open Genymotion to start virtual device then genymotion will recreate the host-only device, and all is go well.