- 博客(91)
- 资源 (7)
- 收藏
- 关注
原创 frp内网穿透+mstc远程桌面
github下载frp客户端以及服务器软件客户端配置文件如下frpc.ini:[common]server_addr = YOUR SERVER IPserver_port = 7000authentication_method = tokentoken = 12345678[rdp]type = tcplocal_ip = 127.0.0.1local_port = 3389remote_por...
2020-10-13 02:06:40
521
原创 嵌入式Linux SSH服务
一. dropbear 1. dropbear交叉编译,并拷贝必要文件到板端。 2. 板端执行 dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key 3. 删除/etc/shadow文件(如果有),然后执行passwd root 4. 开发板执行dropbear -F -E 5. PC端执行ssh root@xxx.xxx...
2020-09-25 10:15:14
91
原创 WIN10网卡命令
查看网卡列表信息:netsh interface ip show interfaces禁用指定网卡:netsh interface set interface "以太网" disabled启用指定网卡:netsh interface set interface "以太网" enabled...
2020-09-25 07:24:19
77
原创 目标文件各代码段、数据段分析
Keil编译后的Code,RO,RW,ZI分别表示什么以及和芯片Flash、SRAM的对应关系Code:代码的大小RO:常量所占空间RW:程序中已经初始化(非0)的变量所占空间ZI:未初始化的static变量和全局变量以及堆栈所占的空间上述参数和芯片Flash以及SRAM的对应关系是Flash占用大小=Code+RO+RWSRAM占用大小=RW+ZI...
2020-07-01 02:56:56
87
原创 linux下应用程序/proc/pid/maps文件python脚本分析大小
#coding:utf-8__author__ = 'zhangxd18'import sysimport osimport stringif "__main__" == __name__: if sys.argv < 2: sys.exit(-1) map_file = sys.argv[1] total_size = 0 with open(map_...
2020-06-22 07:29:52
178
原创 多个静态库封装成一个库文件的三种方法
第一种也是最可移植的方法是使用libtools。在使用libTool构建了其他库之后,只需将.la库添加到Automake libaz_la_LIBADD变量中,或者直接从Makefile中添加以下内容,就可以将它们组合起来:libtool--mode=linkcc-static-olibnew.lalibabc.lalibxyz.la第二种为MRI脚本(例如名为libnew.mri...
2020-06-10 12:43:24
442
原创 Python PIL创建8bit以及16bit灰度图
from PIL import Imagewidth = 320height = 240img_gray_8 = Image.new('L', (width, height), 128)img_gray_16 = Image.new('I;16', (width, height), 128)img_gray_8.save("img_gray_8.bmp")img_gray_16.save("img...
2020-06-10 04:43:57
466
原创 ubuntu16.04快速搭建匿名ftp服务器
apt-get install vsftpd ftp修改文件 /etc/vsftpd.conf :anonymous_enable=YESno_anon_password=YES#anon_root=/srv/ftp然后重启ftp服务service vsftpd restart匿名ftp目录为/srv/ftp,此时在/srv/ftp下创建软连接会失效,可以用mount --bind命令替代。...
2020-05-25 08:59:42
50
原创 python-gitlab由于版本问题导致gitlab.Gitlab报错
在本地能正常使用的gitlab api python脚本迁移到服务器上并安装环境后报错(gitlab没有Gitlab成员),反复比对发现是在安装时python -m pip install python-gitlab,没有指定python-gitlab版本导致的。本地环境为1.14.0,服务器上安装的最新的为2.2.0。将服务器上的卸载并安装指定指定版本后一切正常。python -m pip in...
2020-05-13 08:41:21
299
原创 rtthread系统下lwip TIME_WAIT问题
在rtthread系统测试socket server时发现首次启动可以绑定成功,再次启动时会bind失败,网上提到几种方法:SO_REUSEADDR、 SO_REUSEPORT 、SO_LINGER。尝试之后发现调用函数都失败了。查看LWIP源码发现有 LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT、LWIP_SO_LINGER、SO_REUSE三处定义比较可疑...
2020-05-09 18:01:51
245
原创 source insight 4超过30天后续用
1. 关闭source insight程序。2. 打开 C:\ProgramData\Source Insight\4.0\si4.lic,将Expiration=”2020-XX-XX”中的2020修改为2030。3.修改sourceinsight4.exe, ultraedit工具打开"D:\Program Files (x86)\Source Insight 4.0\sourceinsig...
2020-03-23 02:22:48
446
原创 zxing-cpp交叉编译静态与动态库
https://github.com/glassechidna/zxing-cpp交叉编译工具链为arm-openwrt-linux-gcc,确保PATH路径中已包含其所在目录。编译非opencv版本,下载源码后,删除opencv、opencv-cli目录。然后在CMakeLists.txt文件中将OpenCvFound相关内容注释掉(或者在cmake-gui界面配置将BUILD_BLACKBOX...
2020-03-11 10:09:37
251
原创 交叉编译zbar
http://zbar.sourceforge.net/download.html首先记得设置交叉编译工具链的路径到PATH环境变量中./configure --host=arm-openwrt-linux --enable-shared --enable-static --without-imagemagick --without-jpeg --without-python --without-...
2020-03-10 17:02:27
141
原创 ubuntu samba共享
/etc/samba/smb.conf[public-share] comment = public-share samba service path = /media/public/c479dd3d-46d7-4ea9-891e-2ed1a8896471/public/Public guest ok = yes read only = no browseable = yes...
2020-01-15 09:06:29
51
原创 ubuntu添加账户
su - rootmkdir/home/usernameuseradd-d /home/username usernamepasswd usernamechown username:username /home/username -Rusermod-s /bin/bash username添加sudo 权限:usermod -a -G sudo username一键执行脚本#/bi...
2020-01-13 09:19:11
66
原创 samba共享无法访问
ubuntu samba共享设置后,win10下能看到但是无法访问时,在配置文件中添加 force user = your-user-namesudo service smbd restartubuntu samba共享设置后,win10下访问提示安全策略问题时:按window+R键输入gpedit.msc 来启动本地组策略编辑器。依次找到“计算机配置-管理模板-网络-Lanman工作站”这个节...
2020-01-07 10:26:19
195
原创 python PIL 图片叠加文字
https://github.com/xiaodongzhang1025/Text2Pic#coding:utf-8__author__ = 'zhangxiaodong'import sysimport osimport codecsimport timeimport shutilimport codecsimport chardetfrom PIL import Image,ImageDraw...
2019-12-31 09:30:36
127
原创 ubuntu x64下编译出现找不到 cdefs.h / c++config.h
缺少 sys/cdefs.h ,输入以下命令安装标c库sudo apt-get install build-essential libc6-dev libc6-dev-i386缺少 bits/c++config.h的情况,输入以下命令安装gcc编译相关库sudo apt-get install gcc-4.7-multilib g++-4.7-multilib...
2019-12-27 03:22:29
381
原创 ubuntu 按上下左右方向键出现ABCD
shell下 两种可能:一、由于当前用户使用的shell是/bin/sh。在添加用户的时候没有添加用户的指定shell类型,因此默认为/bin/sh。 可以用如下命令查看当前用户的shell类型: echo $SHELL 如果是/bin/sh,使用如下命令修改shell类型: sudochsh -s /bin/bash username 或者 sudousermod -s...
2019-12-26 18:18:31
215
原创 Ubuntu18.04安装Discuz_X3.4_SC_UTF8【20191201】
sudo apt-get install apache2sudo apt-get install mysql-serversudo apt-get install php php-fpm php-mysql php-xml设置apache站点目录将discuz源码下upload文件夹中的所有内容拷贝到apache站点目录下将站点目录权限修改 sudo chmod 777 -R /var/www/x...
2019-12-24 18:38:54
118
原创 Ubuntu设置静态IP
Ubuntu 18.04设置静态IPUbuntu 18.04的网络管理程序改为netplan了,因此配置方式也需要改喽!查看IP:ifconfig -a查看当前的配置文件:cat /etc/netplan/50-cloud-init.yaml如果要使用静态IP的话,需要修改为下面的样子:# This file is generated from information provided by# t...
2019-12-23 03:39:02
39
原创 Ubuntu 16.04 配置vnc4server
1、安装vnc4server:sudo apt-get install vnc4server2、安装gnome桌面:sudo apt-getinstallgnome-session-flashbacksudo aptinstallubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal -y...
2019-12-21 17:41:43
101
原创 python-gitlab 根据member更新邮件通知列表 Emails On Push
def update_project_emails_onpush_list(git_lab, project_id): function_name = '---> %s\n '%( sys._getframe().f_code.co_name) try: emails = '' project = git_lab.projects.get(pr...
2019-12-16 14:07:16
144
原创 python-gitlab SSL ERROR
import gitlaburl='https://xxxx:yy'token='xxxxxx'session = requests.Session()session.verify = False#session.cert = ('/path/to/client.cert', '/path/to/client.key')git_lab = gitlab.Gitlab(url, token, api...
2019-12-10 11:30:01
119
原创 ubuntu16.04下markdown转pdf文件
安装pandoc工具sudo apt-get install pandoc安装MiktexMiktexhttps://miktex.org/downloadPandoc的默认引擎是pdflatex,不支持中文,需要手动设置为XeLatex引擎后方可支持中文。XeLaTeX是一种使用Unicode的LaTeX排版引擎,支持一些现代字体技术,命令下直接使用xelatex *.tex即可生成对应的PD...
2019-12-05 11:37:49
107
原创 shell 路径中最后一个'/'符号处理
去除路径中最后一个'/'符号test_full_path=$(echo ${test_full_path%*/})获取最后一个'/'符号之前信息test_path=${test_full_path##*/}获取最后一个'/'符号之后信息test_name=${test_full_path%/*}...
2019-11-13 11:27:10
1179
原创 设置git diff用beyond compare工具比较
Windows下:方法1. 直接修改~/.gitconfig文件[diff] tool = bc[difftool "bc"] ...
2019-11-09 09:45:20
310
原创 repo 查看所有git 项目status状态shell脚本
cd YourRepoCodeDirdiff_projects=$(repo diff | grep project)#echo $diff_projectscur_dir=$(pwd)echo $cur_dirarray=(${diff_projects//project/ })for var in ${array[@]}do echo =============================...
2019-11-07 13:06:29
207
原创 adb push pull bat脚本
adb_push.bat@echo offsetlocal enabledelayedexpansiontitle %0set DEST_DIR=/mnt/extsdecho adb devicesadb devicesif "%~1"=="" ( call:FcolorRed echo ----------Please Input Parameter---------- call:Fcol...
2019-11-07 11:00:00
240
原创 vs2019编译live555
vs2019默认安装位置C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional首先到网址http://live555.com/liveMedia/public/下载live555-latest.tar.gz并解压缩。准备工作:一、修改win32config文件1.TOOLS32 = C:\Program Files (x8...
2019-11-06 11:22:13
131
原创 vs2015编译live555
vs2015默认安装位置C:\Program Files (x86)\Microsoft Visual Studio 14.0首先到网址http://live555.com/liveMedia/public/下载live555-latest.tar.gz并解压缩。准备工作:一、修改win32config文件1.TOOLS32 = C:\Program Files (x86)\Microso...
2019-11-05 23:46:26
123
原创 linux shell 字符串拼接方法
CROSS_COMPILE=arm-openwrt-linux-muslgnueabi-echo $CROSS_COMPILE方法1:test1=$(echo $CROSS_COMPILE)gccecho $test1方法2:test2=${CROSS_COMPILE}gccabcecho $test2
2019-11-05 13:18:26
221
原创 ubuntu-X64运行32位可执行程序提示no such file or directory
缺少32位运行环境,安装方法如下:sudo apt-get install lib32ncurses5 lib32z1 lib32stdc++6
2019-11-05 06:31:07
99
原创 交叉编译Makefile
为交叉编译环境编写Makefile时,注意CROSS_COMPILE变量要先export,然后才能在Makefile中使用$(CROSS_COMPILE)gcc。build.sh #!/bin/shexport PATH="$PATH:/Work/QG2101-SDK/prebuilt/gcc/linux-x86/arm/toolchain-sunxi-musl/toolchain/bin"ex...
2019-11-05 05:01:08
369
原创 ubuntu16.04 安装sublime text3
ubuntu16.04 安装sublime text3添加sublime text3的软件源sudo add-apt-repository ppa:webupd8team/sublime-text-3sudo apt-get updatesudo apt-get install sublime-text-installer等待安装完毕后,在终端输入 sublime直接打开sublime text...
2019-11-01 14:04:41
85
原创 Win10 系统优化速度
Win10 系统优化速度:https://jingyan.baidu.com/article/cdddd41cc89e8753cb00e18d.html1. windows search2. super fetch or sysmain3.Connected User Experiences and Telemetry4. 虚拟内存5.Microsoft Compatibility Telem...
2019-10-27 19:26:14
42
原创 GIT查看文件每一行的代码是谁提交
GIT一个文件中代码被多个人修改,如何确定这行代码是谁更改的呢?可以使用如下命令:-L 后跟的两个数字代表要查找的开始行数和结束行数,后面路径为要查找的文件路径+文件名。git blame -L 1480,1500 test/test.c也可以不加-L参数,直接 git blametest/test.c执行命令结果显示顺序依次为: 版本号、作者、时间、行号 、代码行。...
2019-09-29 01:39:45
273
原创 mstsc 保存用户名和密码,实现自动登录远程桌面
首先手动连接远程桌面,登陆时记得保存连接,得到.rdp文件。在.rdp文件中结尾处添加用户名以及密码信息:username:s:yournamepassword 51:b:yourpasswd批处理命令:start "RemoteConsole %destIP%" mstsc %destIP%.rdp /v:%destIP%密码生成工具https://www.remkoweijnen.nl/bl...
2019-08-19 14:38:21
728
原创 由于没有远程桌面授权服务器可以提供许可证
由于没有远程桌面授权服务器可以提供许可证导致无法连接远程桌面的解决办法:远程桌面服务配置和授权激活:https://jingyan.baidu.com/article/9f7e7ec0f5a8686f281554d9.html如果之前可以正常连接远程桌面但是突然报出 “由于没有远程桌面授权服务器可以提供许可证”的提示,根本原因在于,server 2012 或server 2008等默认的最大远程...
2019-08-19 14:24:58
456
原创 Beyond Compare 4解除日期限制,恢复试用30天
修改注册表1 在搜索栏中输入 regedit ,打开注册表2 删除项目:计算机\HKEY_CURRENT_USER\Software\Scooter Software\Beyond Compare 4\CacheId批处理文件如下:(将以下代码写入文本文档,重命名该文档为delete.bat,然后右键--以管理员身份运行即可)@echo offsetlocal enabledelayedexp...
2019-05-07 09:52:43
130
usb cdc-acm串口4KB读写问题
2022-09-28
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅