docker容器总是连接不到主机上的myql,是因为iptables 阻止了

摘要: docker容器总是连接不到主机上的myql,是因为iptables 允许容器访问 主机的端口 iptables -I INPUT -s 172.17.0.0/16 -p tcp --dport 6379 -j ACCEPTiptables -I INPUT -s 172.17.0.0/16 -p 阅读全文
posted @ 2021-07-27 13:35 少杨 阅读(273) 评论(0) 推荐(0)

git忽略已经加入版本控制的文件

摘要: git update-index --assume-unchanged logs/*.log 来源:https://www.jianshu.com/p/2345b2aede59 阅读全文
posted @ 2021-03-18 11:44 少杨 阅读(42) 评论(0) 推荐(0)

go 获取mysql 表结构

摘要: 下载 go get -u gorm.io/gorm go get -u gorm.io/driver/mysql 编辑代码 import ( "fmt" "gorm.io/driver/mysql" "gorm.io/gorm" ) type Result struct { Field string 阅读全文
posted @ 2021-01-28 17:15 少杨 阅读(1465) 评论(1) 推荐(0)

css 不按英文单词换行

摘要: 按字符换行,而不是按 单词换行 (用于两边对齐)word-break: break-all; 阅读全文
posted @ 2021-01-23 13:39 少杨 阅读(329) 评论(0) 推荐(0)

mac filezilla You do not have permission to list this directory

摘要: 设置可以上传的目录 Edit | Directory access permissions 来源:https://stackoverflow.com/questions/61641830/filezilla-you-do-not-have-permission-to-list-this-direct 阅读全文
posted @ 2020-12-09 12:57 少杨 阅读(156) 评论(0) 推荐(0)

phpstom 配置xdebug

摘要: xdebug 原理 : php 服务器为 client , phpstom 为调试服务器 获取php对应的xdebug 版本: https://xdebug.org/wizard php.ini 配置: zend_extension=xdebug.so xdebug.remote_enable=1 阅读全文
posted @ 2020-11-23 23:21 少杨 阅读(107) 评论(0) 推荐(0)

MySQL server has gone away

摘要: 查看错误日记路径: show variables like 'log_error'; 日志中显示: [Warning] File Descriptor 1832 exceeded FD_SETSIZE=1024 我发现我的table_open_cache参数值是2000。这明显超过了日志中最大值10 阅读全文
posted @ 2020-11-19 09:59 少杨 阅读(149) 评论(0) 推荐(0)

qt ubuntu EditText 不能输入中文

摘要: 使用的输入法是搜狗,ubuntu16为中文。已经安装过fcitx cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so ./Qt5.9.8/5.9.8/ 阅读全文
posted @ 2020-11-15 13:13 少杨 阅读(235) 评论(0) 推荐(0)

mac 10.15.7 修改PATH

摘要: 在.zprofile 文件中修改 export PATH="/Users/用户/bin:$PATH" .zprofile 相当于 .bash_profile.zshrc 相当于 .bashrc 阅读全文
posted @ 2020-11-08 14:32 少杨 阅读(177) 评论(0) 推荐(0)

oc 属性类型一般用法

摘要: @property (nonatomic,assign) int ticketCount; NSString :copy -> @property (nonatomic,copy) NSTring *name; block :copy -> @property (nonatomic,copy) vo 阅读全文
posted @ 2020-11-08 11:54 少杨 阅读(127) 评论(0) 推荐(0)