GTest学习---Google单元测试框架 参考文档,共8篇系列文档:初识gtesthttps://www.cnblogs.com/coderzh/archive/2009/03/31/1426758.html断言https://www.cnblogs.com/coderzh/archive/2009/04/06/1430364.html事件机制https://www.cnblogs.com/coderzh/archive/2009/04/06/1430396.html参数化https://www.cnblogs.com/coder
自定义bash命令 自定命令,所有用户,永久生效vim /etc/bashrc...source /etc/bashrc自定命令,当前用户,永久生效vim ~/.bashrc...source ~/.bashrc自定命令,当前终端,临时生效alias mytest= 'chmod 777 tesh.sh && ./test.sh'取消自定命令unalias mytest...
流量监控脚本net_monitor.sh #!/bin/bash ethn=$1 while truedo RX_pre=$(cat /proc/net/dev | grep $ethn | sed 's/:/ /g' | awk '{print $2}') TX_pre=$(cat /proc/net/dev | grep $ethn | sed 's/:/ /g' | awk '{print $10}') sleep 1 RX_n
计时器C++ #pragma once#include <chrono>class CountTime {private: std::chrono::steady_clock::time_point beginTime;public: CountTime(){ begin(); } ~CountTime(){ } inline void begin(){ beginTime = std::chrono::steady_clock::now(); } inline void restart(
配置文件读写:ConfigFile.hpp(支持无段名的配置项) 支持无段名的配置项#ifndef __CONFIGFILEINI_H_#define __CONFIGFILEINI_H_#include <unordered_map>#include <fstream>#include <string>#include <vector>#include <sstream>#include <memory>#include <mutex>#define CONF_DEF
python压缩、解压文件 python压缩、解压文件#!/usr/bin/env python3# coding: utf-8import os, tarfiledef make_targz(output_filename, source_dir): """ 一次性打包目录为tar.gz :param output_filename: 压缩文件名 :param source_dir: 需要打包的目录 :return: bool """ try: wit
自制GDB使用教程 GDB使用教程参考文档:https://www.cnblogs.com/liangyc/p/11631823.html文章目录GDB使用教程开始调试设置断点: `break`或`b`删除断点: `delete`或`d`禁用/启用断点设置监视点查看断点/监视点信息查看代码: `list`或`l`打印变量信息: `print`或`p`查看调试信息: `info`或`i`查看变量的类型查看内存: `examine`或`x`流程控制多线程调试: `thread`或`t`查看堆栈帧: `backtrace`或
GIT自学教程 自制GIT教程[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-86LPN4dJ-1594375264038)(C:\Users\x30006331\AppData\Roaming\Typora\typora-user-images\image-20200709145833887.png)]git clonegit addgit commitgit checkout例1:git checkout -- readme.txt解释:将readme.txt文件在工作