systemd vncserver

PC:~$ cat /lib/systemd/system/vncserver@.service [Unit] Description=Start TightVNC server at startup…

perf性能火焰图生成

#!/bin/bash #sudo sh -c 'echo kernel.perf_event_paranoid=1 >> /etc/sysctl.d/99-perf.conf&…

tshark命令相关

sudo tshark -i ap1 -O 'http' -n -Y 'http.host == "sdkxgxyajs.data.kuiniuca"&#3…

使用脚本上传coredump文件至远端服务器

> cat /proc/sys/kernel/core_pattern |/opt/crash_reporter.sh %E %t > cat crash_reporter.sh #!/…

迭代bash脚本参数

#!/bin/bash # method 0: for i in $# # method 1 args=$# for (( i=1; i<=$args; i++ )) do echo…

__attribute__ ((weakref))

/* weakref weakref ("target") The weakref attribute marks a declaration as a weak referenc…

通过elrepo升级centos7内核

# 升级系统 yum update -y # 安装 ELRepo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uv…

dart中转换list为map

void main() { var a = ['红色', '蓝色', '紫色'] .asMap() .map((index,…

利用模版将多enum转为BitSet

#include <bitset> #include <string> #include <type_traits> #define SetBit(x) (0x1…

通过模板实现可迭代cursor类

#include <type_traits> #include <string> #include <array> enum class ETest : uint…