滚熊博客

滚熊博客

Thoughts, rants and discoveries on software development and related stuff.

(solved) The pkg-config package 'libpcre' is required but it could not be found.

·Linux

pkg-confg 确认是否存在。 $ pkg-config --libs libpcrePackage libpcre was not found in the pkg-config search path.Perhaps you should add the directory containing `libpcre.pc'to the PKG_CONFIG_PATH environment variableNo package 'libpcre' found 编辑profile $ vim ~/.bash_profile .bash_profile添加以下。 export PKG_CONFIG_PATH=/usr/lib/pkgconfig 保存 . ~/.bash_profile中 验证 $ pkg-config --libs libpcre-lpcre

Read More →
#pcre

58到家MySQL升级规范[转]

·SQL

一、基础规范 表存储引擎必须使用InnoDB 表字符集默认使用utf8,必要时候使用utf8mb4 解读: (1)通用,无乱码风险,汉字3字节,英文1字节 (2)utf8mb4是utf8的超集,有存储4字节例如表情符号时,使用它 禁止使用存储过程,视图,触发器,Event 解读: (1)对数据库性能影响较大,互联网业务,能让站点层和服务层干的事情,不要交到数据库层 (2)调试,排错,迁移都比较困难,扩展性较差 禁止在

Read More →
#mysql#58

[解决]mysql max_allowed_packet 设置过小导致记录写入失败

·SQL

以下方法的第一种方法在有些机子上更改是没有作用的,建议大家使用第二种方法。 mysql根据配置文件会限制server接受的数据包大小。 有时候大的插入和更新会受max_allowed_packet 参数限制,导致写入或者更新失败。 查看目前配置 show VARIABLES like '%max_allowed_packet%'; 显示的结果为: +--------------------+---------+ | Variable_name | Value | +--------------------+---------+ | max_allowed_packet | 1048576 | +--------------------+---------+ 以上说明目前的配置是:1M 修改方法 1、修改配置文件 可以编辑my.cnf来修改(windows下my.ini),在[m

Read More →
#sql#mysql

My xfce shortcuts to take screenshots

·Linux

Command Shortcut xfce4-screenshooter --fullscreen --clipboard Ctrl + PrtScrn xfce4-screenshooter --fullscreen --save /home/kelvin/Pictures PrtScrn xfce4-screenshooter --region --clipboard Ctrl + Shift + PrtScrn xfce4-screenshooter --region --save /home/kelvin/Pictures Shift + PrtScrn xfce4-screenshooter --window --clipboard Ctrl + Super + PrtScrn xfce4-screenshooter --window --save /home/kelvin/Pictures Super + PrtScrn Screenshot_2018-01-06_19-52-50.png

Read More →
#xfce#shortcuts#screenchots

web服务器压力测试一例

·Linux

近期部门新上线一个服务,我们使用ab和locust分别测试 目前项目属于demo阶段,对访问量的支持不要求太高,我们暂且设定在500请求,20并发 工具介绍 ab ab全称为:Apache HTTP server benchmarking tool ab是apache自带的压力测试工具。ab非常实用,它不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试。比如nginx、tomcat、IIS等。 locust locust是一个开源负载测

Read More →
#ab#locust

.htaccess使用详解

·Linux

Apache Web 服务器可以通过 .htaccess 文件来操作各种信息,这是一个目录级配置文件的默认名称,允许去中央化的 Web 服务器配置管理。可用来重写服务器的全局配置。该文件的目的就是为了允许单独目录的访问控制配置,例如密码和内容访问。 下面是 21 个非常有用的 .htaccess 配置的提示和技巧: 1. 定制目录的 Index 文件 DirectoryIndex index.html index.php index.htm 你可以使用上面的配置来更改目录的默认页面,例如你将这个脚本放在 foo 目录,则用户请求 /foo/ 时候就会访问 /foo/index.html 。 2. 自定义错误页 ErrorDocument 404 errors/404.html 当用户访问页面

Read More →
#Apache#linux#htaccess

[移动端]专用的meta

·Css

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> width和height指令分别指定视区的逻辑宽度和高度。他们的值要么是以像素为单位的数字,要么是一个特殊的标记符号。width指令使用device-width标记可以指示视区宽度应为设备的屏幕宽度。类似地height指令使用device-height标记指示视区高度为设备的屏幕高度。 user-scalable指令指定用户是否可以缩放视区,即缩放Web页面的视图。值为yes时允许用户

Read More →
#meta#mobile#html

About

Carlos is a software developer based in Cascavel, Brazil, currently working remotely as a Principal Site Reliability Engineer at TOTVS Labs. While not working on his daily job, he may be hacking on open source, reading books, lifting weights or playing some FPS (Battlefield and Call of Duty). Carlos is interested in programming languages, containers, distributed systems, monitoring and software in general. Feel free to shoot him an email if you need help with any of that. 🙂 He lives with Nanyang (his wife), Zakk (a chinchilla) and Bash (a Golden Retriever), in Cascavel - PR, Brazil. Family ❤️ If you like my work… … or find it useful, consider sponsoring me on GitHub:

Read More →