常用小工具集
ubuntu下播放h264,h265文件
https://blog.csdn.net/rjszcb/article/details/112392487
EXPORT
# if defined( MP4V2_EXPORTS )
# define MP4V2_EXPORT __declspec(dllexport)
# define MP4V2_EXPORT __declspec(dllimport)
# define MP4V2_EXPORT
# define MP4V2_EXPORT __attribute__((visibility("default")))
https://www.cnblogs.com/helloweworld/p/4372936.html
SIGPIPE
struct sigaction sa;
sa.sa_handler = SIG_IGN;
sigaction( SIGPIPE, &sa, 0 );
#include <signal.h>
void handle_pipe(int sig)
{
//do nothing
}
int main()
{
struct sigaction sa;
sa.sa_handler = handle_pipe;
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sigaction(SIGPIPE,&sa,NULL);
//do something
}
https://www.cnblogs.com/zxc2man/p/7660240.html
linux kernel debug
https://www.ibm.com/developerworks/cn/linux/l-kdbug/index.html
https://www.ibm.com/developerworks/cn/linux/l-cn-dumpanalyse/index.html
https://www.cnblogs.com/dhcn/p/10898843.html
linux coredump
ulimit -c ulimit -c unlimited ulimit -a vi /etc/profile ulimit-c unlimited vi /etc/rc.local echo "/data/coredump/core.%e.%p" >/proc/sys/kernel/core_pattern gdb core-file /data/coredump/core.test.9198 #gdb ./test core.xxxxx where or bt
#include<stdio.h> void core_test1(){ int i=0; scanf("%d",i); printf("%d\n",i); } void core_test2(){ char *ptr = "my name is hello world"; *ptr = 0; } int main(){ core_test1(); return 0; }
g++ -g core.cpp -o test
ps -ef |grep gb28181-ms
screen -ls
screen -r id
screen -D -r id
ctrl + a + d 退出
linux文件/目录属性
-rw------- (600) 只有所有者才有读和写的权限
-rw-r--r-- (644) 只有所有者才有读和写的权限,组群和其他人只有读的权限
-rwx------ (700) 只有所有者才有读,写,执行的权限
-rwxr-xr-x (755) 只有所有者才有读,写,执行的权限,组群和其他人只有读和执行的权限
-rwx--x--x (711) 只有所有者才有读,写,执行的权限,组群和其他人只有执行的权限
-rw-rw-rw- (666) 每个人都有读写的权限
-rwxrwxrwx (777) 每个人都有读写和执行的权限
chrome离线安装
https://www.jianshu.com/p/7c93b62387ab
linux nc
https://linux.die.net/man/1/nc
Ubuntu环境下SSH服务安装、SSH远程登录以及SSH数据传输
https://www.cnblogs.com/asyang1/p/9467646.html
minicom配置
sudo minicom -s
dos2unix
sudo apt-get -y install dos2unix
find . -type f -exec dos2unix {} \;
sudo apt install clang-format
find ./ -iname "*.hpp" -o -iname "*.cpp" | xargs clang-format -style=file -i
windows下对127.0.0.1抓包, RawCap很方便
https://blog.csdn.net/sunny_ss12/article/details/51460848
code::blocks clion atom vscode
ubuntu安装atom
https://blog.csdn.net/hao5743/article/details/52056194
ubuntu安装vscode
sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake web visual-studio-code
umake web visual-studio-code --remove
code.visualstudio.com
sudo dpkg -i code_1.44.2-1587059832_amd64.deb
gcc升降级
https://blog.csdn.net/agenih/article/details/79491366
https://blog.csdn.net/betty13006159467/article/details/78394974
git 一个分支完全覆盖另一个分支
1,git push origin develop:master -f
就可以把本地的develop分支强制(-f)推送到远程master
2,
git checkout master // 切换到旧的分支
git reset –hard develop // 将本地的旧分支 master 重置成 develop
git push origin master –force // 再推送到远程仓库
liaoxuefeng git
14、树梅派
树梅派应用56:用树莓派搭建Git私有服务器
https://blog.csdn.net/huayucong/article/details/54407143
树梅派应用58:使用ngrok将树莓派web服务映射到公网
https://blog.csdn.net/huayucong/article/details/54407189
13、Linaro Toolchain
https://www.linaro.org/downloads/
Linaro provides monthly GCC source archive snapshots of the current Linaro GCC release branch, as well as quarterly releases of pre-built Linaro GNU cross-toolchain binary archives.
The following tables provide direct access to the most common Linux and bare-metal ABI variants of the Linaro binary cross-toolchain quarterly releases. Both x86_64 Linux and Mingw32 (MS Windows compatible) host binaries are provided:
Latest Linux Targeted Binary Toolchain Releases
arm-linux-gnueabihf | 32-bit ARMv7 Cortex-A, hard-float, little-endian | Release-Notes | Binaries | Source |
armv8l-linux-gnueabihf | 32-bit ARMv8 Cortex-A, hard-float, little-endian | Release-Notes | Binaries | Source |
aarch64-linux-gnu | 64-bit ARMv8 Cortex-A, little-endian | Release-Notes | Binaries | Source |
Latest Bare-Metal Targeted Binary Toolchain Releases
arm-eabi | 32-bit ARMv7 Cortex-A, soft-float, little-endian | Release-Notes | Binaries | Source |
aarch64-elf | 64-bit ARMv8 Cortex-A, little-endian | Release-Notes | Binaries | Source |
12、交叉编译lrzsz实现arm串口xmodem,ymodem,zmodem协议的lrz和lsz数据收发
http://blog.chinaunix.net/uid-20564848-id-74714.html
11、各种视音频封装格式分析
http://blog.csdn.net/leixiaohua1020/article/details/17934487
10、USB 调试工具(python2.7 + Tkinter + pyusb/pywinusb)
http://www.cnblogs.com/jakeyChen/p/4463530.html
https://github.com/Qbicz/ChibiOS-mems-usb
9、串口调试工具(Python2.7+pyserial+Tkinter)
http://www.cnblogs.com/jakeyChen/p/4465281.html
8、在windows上用adb安装android apk
adb工具:https://files.cnblogs.com/files/dong1/adb1.0.32.zip
用ADB(Android Debug Bridge)实时监测Android程序的运行
https://blog.csdn.net/peibaoyi/article/details/9422487
7、VIM安装插件
1)sudo apt-get install ctags
2)ctags -R
http://www.cnblogs.com/ynxf/p/5922661.html
http://www.cnblogs.com/zhaoyl/p/4078164.html
6、CheckTool:CRC校验、累加和校验、异或和校验专业校验工具V1.1
http://www.cnblogs.com/tdyizhen1314/archive/2012/10/10/2718808.html
5、keil mdk __attribute__用法
4、beyond compare 30天评估期到期
beyond compare 4你的30天评估期到期,那时候也打不开软件,输入不了注册码,然后也不想花过多时间搞这玩意,简单,一步解决问题。
找到beyond Compare 4文件夹下面的BCUnrar.dll,将其删掉或者重命名,再重新打开接着使用。windows下可行,linux没试。
3、PL2303驱动
http://www.prolific.com.tw/US/ShowProduct.aspx?pcid=41&showlevel=0017-0037-0041
2、repo应用
下了好几个repo都不靠谱,运行报错
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
解决方法,先单独克隆repo,然后将git-repo里面的repo文件复制到用户根目录下的bin目录里,在同步源码的工作目录新建.repo文件夹,把git-repo重命名为repo复制到.repo目录下:
git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
重新初始化:
repo init -u https://github.com/intel-ndg/manifest -b v4.1 -m default.xml
同步开始
repo sync -j5
1、代码托管
1)github公共空间免费,私有空间收费。
2)gitlab完全免费再加送整个系统
3)bitbucket比github更好用