自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(35)
  • 收藏
  • 关注

原创 nvim-treesitter gcc-4.8.5安装cpp parser失败

local args = {} 添加 "-std=c99"执行 TSInstallSync cpp。

2023-10-31 10:57:05 179

原创 docker run非root用户登录

docker run -d --name ubuntu --memory=2G -it -v /home/ubuntu/workspace:/home/ubuntu/workspace -u username ubuntu-img

2023-06-28 18:23:31 133

原创 Ubuntu网络唤醒

1. 安装ethtoolsudo apt install ethtool2. ifconfig 记录网卡eth0的MAC地址3. sudo ethtool eth0Supports Wake-on: pumbgWake-on: dSupports Wake-on: pumbg 表示支持网络唤醒Wake-on: d 表示处于禁用状态4. sudo vim /etc/systemd/system/wol.service[Unit]Description=Enable Wa

2022-05-25 21:21:42 3076

原创 zlib win32编译

1. run cmd2. "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"3. nmake -f .\win32\Makefile.msc

2022-05-07 13:47:05 299

转载 Ubuntu空闲自动关闭屏幕,按键激活

Create a file:sudo vim /etc/systemd/system/enable-console-blanking.serviceAnd put this into the file:[Unit]Description=Enable virtual console blanking[Service]Type=oneshotEnvironment=TERM=linuxStandardOutput=ttyTTYPath=/dev/consoleExecStar

2022-04-21 22:49:32 490

原创 Ubuntu修改grub启动等待时间

1. sudovim /etc/default/grubGRUB_DEFAULT=0GRUB_TIMEOUT_STYLE=hiddenGRUB_TIMEOUT=1GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`GRUB_CMDLINE_LINUX_DEFAULT=""GRUB_CMDLINE_LINUX=""GRUB_HIDDEN_TIMEOUT=1GRUB_HIDDEN_TIMEOUT_QUIET=.

2022-04-21 22:28:43 1745

原创 ubuntu修改网络接口名

sudo vim /etc/netplan/00-installer-config.yamlnetwork: ethernets: eth0: dhcp4: true match: macaddress: 00:1a:27:81:e6:93 set-name: eth0 version: 2

2022-04-11 23:21:03 782

原创 ubuntu笔记本合盖不休眠设置

1.sudo vim /etc/systemd/logind.conf添加HandleLidSwitch=ignoreHandleLidSwitchExternalPower=ignoreHandleLidSwitchDocked=ignore2.sudo systemctl restart systemd-logind.service

2022-04-05 09:54:14 1352

原创 Linux生成coredump文件

查看是否开启:如果输出为0则没有开启ulimit -c开启:ulimit -c unlimitedsudo sysctl -w kernel.core_pattern=core.%u.%p.%tcat /proc/sys/kernel/core_pattern

2022-04-01 18:12:58 156

转载 How to disable/enable GUI on boot in Ubuntu 20.04

How to disable GUI on boot in Ubuntu 20.04 step by step instructionsThe following command will disable GUI on boot hence upon the reboot the system will boot into multi user target: $ sudo systemctl set-default multi-user Reboot or log out from a c

2022-02-22 18:38:56 327

原创 nginx编译,修改日志路径

1 ./configure --without-http_rewrite_module2. 修改objs/ngx_auto_config.h#ifndef NGX_PID_PATH#define NGX_PID_PATH "/var/logs/nginx/nginx.pid"#endif#ifndef NGX_LOCK_PATH#define NGX_LOCK_PATH "/var/logs/nginx/nginx.lock"#endif#ifndef NGX_ERROR_L..

2021-10-25 13:37:36 4188

转载 Setting up a Git HTTP server with Nginx

Install the required packagessudo aptinstall nginxfcgiwrap apache2-utils -ynginx: is needed as the webserverfcgiwrap: will be our interface to the git-http-backendapache2-utils: is needed to generate the password hash for authenticationConfigur..

2021-09-22 22:14:50 106

原创 depot_tools download CPID client for windows 设置代理

Downloading CIPD client for windows-amd64 from https://chrome-infra-packages.appspot.comFailed to download the file, check your network connection解决方法:$wc = (New-Object System.Net.WebClient)// 添加$proxy = (New-Object System.Net.WebProxy)$proxy.Ad.

2021-09-13 09:31:17 2930 2

转载 在Mac中设置Supervisord开机自启动

添加 plist 启动配置文件:cat /Users/kyle/etc/launchctl/com.agendaless.supervisord.plist 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <?xml version="

2021-08-29 19:40:23 453

原创 git加密git-crypt

1. copy git-crypt.exe libeay32.dll to C:\Program Files\Git\mingw64\bin2. cd project3. git-crypt init4. specify files to encrypt by creating a .gitattributes file: secretfile filter=git-crypt diff=git-crypt *.key filter=git-crypt diff=git-crypt...

2020-06-24 15:18:52 700

原创 vmware ubuntu 挂载共享文件hgfs

sudo apt install open-vm-tools1. 手动挂载sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other2. 自动挂载打开/etc/fstab,添加.host:/ /mnt/hgfs fuse.vmhgfs-fuse auto,allow_other 0 0

2020-05-12 23:55:57 1282

转载 Windows 10 L2TP/IPSec 防火墙配置

This guide will walk you through how to open your Windows 10 firewall to allow the L2TP/IPSec protocol. For more about the L2TP/IPsec firewall ports you can read up on thisL2TP VPN ports to allow in ...

2019-09-12 10:58:43 1074

转载 Windows 10 L2TP/IPSec 防火墙配置

This guide will walk you through how to open your Windows 10 firewall to allow the L2TP/IPSec protocol. For more about the L2TP/IPsec firewall ports you can read up on thisL2TP VPN ports to allow in ...

2019-09-12 10:57:57 5014

原创 服务端创建git仓库

服务端:1. cd /home/git2. git init --bare sample.git3.chown -R git:git sample.git客户端:1. 生成ssh密钥ssh-keygen -t rsa -C "user-email"2. 复制 id_rsa.pub 内容到 服务端 /home/git/.ssh/authorized_keys...

2019-08-23 11:29:41 232

原创 lldb print array

#print byte arrayp/x *(uint8_t(*)[10])ptr#print long string:set set target.max-string-summary-length 10000

2019-02-21 15:06:32 885

原创 webrtc audio processing 静态库依赖

                -lwebrtc_apm \                -lwebrtc_aec \                -lwebrtc_aecm \                -lwebrtc_ns \                -lwebrtc_base \                -lwebrtc_beamformer \...

2019-01-09 17:43:01 887 3

原创 pptpd添加路由

iptables -A INPUT -i ppp0 -p tcp -m tcp --dport 1723 -j ACCEPTiptables -A INPUT -i ppp0 -p tcp -m tcp --dport 47 -j ACCEPTiptables -A INPUT -i ppp0 -p gre -j ACCEPTiptables -A INPUT -i ppp0 -p udp ...

2018-11-24 18:01:51 672

原创 webrtc生成ios audio_processing库

gn gen out/ios_64 --args='target_os="ios" target_cpu="arm64" is_debug=false ios_deployment_target="8.0"'ninja -C out/ios_64 audio_processing

2018-11-24 16:10:08 386

原创 CentOS 7 安装FreeSWITCH

【编译】git clone https://freeswitch.org/stash/scm/fs/freeswitch.gitcd freeswitch/./bootstrap.shsudo yum install libjpeg-devel sqlite-devel speex-devel speexdsp-devel ldns-devel libidn-devel unbound-devel...

2018-07-13 19:43:48 396

原创 Centos 7安装Vmware Tools

1. Install prerequisites :yum install perl gcc make kernel-headers kernel-devel -y2. Mount cdrommkdir /mnt/cdrommount -t iso9660 /dev/cdrom /mnt/cdrom3. Extract the vmware tools package :cp /mnt/cdrom...

2018-05-01 10:22:08 220

原创 Supervisor安装和配置

1. easy_install supervisorecho_supervisord_conf > /etc/supervisor/supervisord.conf2. vi /etc/supervisor/supervisord.conf[include]files = /etc/supervisor/conf.d/*.conf3. mkdir con

2017-01-19 10:01:38 359

原创 Windows环境下编译x264动态库

一、下载最新的x264代码,可以到这里下载http://www.videolan.org/developers/x264.html解压到MSYS目录下home文件下D:\MinGW\msys\1.0\home\Administrator\x264-snapshot二、进入msys环境配置编译,可能会提示没有yasm汇编器的错误,可以下载一个yasm汇编器,拷贝到msys目录下的

2016-11-15 10:13:36 889

原创 Mac 配置bcompare & diffall

1. 安装beyond compare2. 安装beyond compare command line    menu -&gt; Install Command Line Tools3. 下载git-diffallhttps://github.com/thenigan/git-diffall4. 安装git-diffall    cp git-diffall $(git --exec...

2014-11-12 15:30:22 1356 1

原创 pcm写入wav文件

typedef struct {    FOURCC  ckid;    DWORD   cksize;    FOURCC  fccType;    FOURCC  fmt;    DWORD   nFmtSize;    WORD    wFormatTag;    WORD    nChannels;    DWORD   nSamplesPerSec; 

2014-10-27 16:38:05 542

原创 IOS交叉编译configure

./configure -prefix=/Users/${username}/opensource -host=armv7-apple-darwin -build=x86_64-apple-darwin13.3.0 CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c

2014-09-30 15:15:41 885

转载 查找文件并替换字符串

import stringimport osimport structimport reimport fileinputimport fnmatchdef walkDir(directory, ext='*.c', topdown=True):    fileArray = []   for root, dirs, files in os

2014-09-11 17:42:46 522

转载 iOS static library cross-compile script

# iOS builds for ARMv7 and simulator i386.# Assumes any dependencies are in a local folder called libs and# headers in a local folder called headers.# Dependencies should already have been compiled fo

2014-09-10 20:15:30 851

原创 mutex死锁追踪

void debug_mutex_init(gs_mutex_t *mutex, void *data){    pthread_mutex_init(&mutex->mutex, data);    mutex->file[0]='\0';    mutex->line = 0;}void debug_mutex_destroy(gs_mutex_t *mutex

2014-08-27 17:46:14 899

原创 hex_dump

void hex_dump(int index, char *buffer, int size){    fprintf(stderr, "[%03d] ", index);    int max = (size > 16 ? 16 : size);    for (int i = 0; i     {        fprintf(stderr, " %02x", buf

2014-04-22 11:32:38 838

转载 makefile $@ $< $^ 自动化变量

自动化变量及其说明:$@  表示规则中的目标文件集。在模式规则中,如果有多个目标,那么,"$@"就是匹配于目标中模式定义的集合。 $%  仅当目标是函数库文件中,表示规则中的目标成员名。例如,如果一个目标是"foo.a(bar.o)",那么,"$%"就是"bar.o","$@"就是"foo.a"。如果目标不是函数库文件(Unix下是[.a],Windows下是[.lib

2014-02-13 10:50:04 458

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除