密钥登陆能,发现SSH不行,提示:
$ssh -l xiangdong 10.244.25.**
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

到:
$ssh -l xiangdong 10.244.25.**
xiangdong@10.244.25.89's password:


实践OK办法,能密钥能密码:
cat  /etc/ssh/sshd_config|grep -E "PermitRootLogin|UsePAM|PasswordAuthentication"

UsePAM yes  #改成NO后出现需要密钥,还登陆不了。后修改为yes后重启oK service sshd restart
PermitRootLogin yes
PasswordAuthentication yes


root依然不行,修改UsePAM no,还是不行,后来加一个irdcops帐号且能 sudo ,也就用它去SSH就行了:
$ssh -l root 10.244.25.**
root@10.244.25.**'s password:
Permission denied, please try again.

==================================
首先:配置ssh服务器配置文件。

在root 用户下才能配置。

vi /etc/ssh/sshd_config

权限设为no:

#PermitRootLogin yes

#UsePAM yes

#PasswordAuthentication yes

如果前面有# 号,将#号去掉,之后将yes修改为no。

修改之后为:

PermitRootLogin no

UsePAM no

PasswordAuthentication no

权限设为yes:

RSAAuthentication yes

PubkeyAuthentication yes

(2)重启sshd服务

systemctl restart sshd.service

systemctl status sshd.service #查看ssh服务的状态

#systemctl start sshd.service  #开启ssh服务

#sytemctl enable sshd.service #ssh服务随开机启动,还有个disabled

#systemctl stop sshd.ervice #停止

正常情况下应该是Active:active(running)
摘自:https://www.cnblogs.com/xubing-613/p/6844564.html
用了这么久的MAC,一直在找这个剪切文件的方法。


今天没事在网上找别的东西时偶然的发现了关于MAC下剪切的快捷键!
和大家分享一下!!

首先选中文件,按Command+C复制文件;

然后按Command+Option+V;就可以把你的文件剪走了!


在这里补充一下,我这里讲的是剪切文件夹,不是剪切文本和文字!Command+X只能剪切文字文本之类的!

来自:https://bbs.feng.com/read-htm-tid-5861420.html
引言
习惯了使用markdown 输入法,便什么都是用 md 来编写,可惜目前文件双击都是使用 xcode 打开的。右键选择打开方式,无法更改默认打开方式(和 windows 不同),才发现,默认打开另有地方。只需三步完美设置,请看下列步骤:
步骤
一、右键选中文件,点击显示简介

二、在显示简介标签页,点击下拉框选中我们需要打开的软件
这里我使用的简洁优美小众的 Typora,好产品值得推荐

三、所有格式都用它打开,得点选:使用此应用程序打开所有这种类型的文稿。【全部更改...】 <==点它。

来自:https://blog.csdn.net/lovechris00/article/details/79935134
CentOS7升级GCC版本:https://jackxiang.com/post/10700/

想打包一个swoole最新版,出现 问题如下:


解决办法:
安装最新版本的swoole 提示

pecl install swolle
...
GCC 4.8 or later required.
首先想到的时候yum更新gcc

yum install gcc
Package gcc-4.4.7-23.el6.x86_64 already installed and latest version
Nothing to do
已经是最新版本了,怎么办,只有找其它源了

curl -Lks http://www.hop5.in/yum/el6/hop5.repo > /etc/yum.repos.d/hop5.repo
yum install gcc gcc-g++
安装成功

gcc -v
gcc version 4.8.2 20131212 (Red Hat 4.8.2-8) (GCC)


来自:https://my.oschina.net/2688/blog/2933883
Windows10自带剪贴板,前提是将系统升级到win10 1809的更新及其以上,才会有系统的剪贴板,我们可以尝试更新win10系统解决。
打开方法:
下载文件
,放到这儿:C:\Windows\System32\clipbrd.exe


picindex=3" target="_blank">https://jingyan.baidu.com/album/574c5219f8073f2c8d9dc198.html?picindex=3
https://jingyan.baidu.com/article/3d69c551a9a4d8b1cf02d7b1.html

按WIN+V键即可打开剪贴板查看器。

1)Windows下有一个复制粘贴的,免费开源的 Windows 管理剪贴板,让你处理文字更高效:Ditto,快捷键个人设置的是 Ctrl + Shift + D,Mac下也需要有这样一款软件。
2)贴贴板 – 高效易用的剪贴板工具[macOS]:  https://www.appinn.com/tie-tie-ban-for-macos
快捷键:  Ctrl+1  or  fn+option+F1 or option + 1
自己一直在用,very good!
1、Mac(Paste破解版)

     百度网盘下载链接:https://pan.baidu.com/s/1ZxfHW0YJ5-ibepIPh8XC7g

     使用方法:先按Command+C复制文本或图片,然后按Command+Shift+V(快捷键可自定义)选择历史粘贴对象。

   【如果安装后打开时提示:已损坏,移到废纸篓。

      解决方法: 在隐私里面打开任意来源

      具体做法:打开终端\ 输入命令:sudo spctl --master-disable  (master前面为两短-) 

      此时去mac的系统偏好设置\安全性与隐私,可以看到下图,就解决问题了。



2、Win(多款)

    百度网盘下载链接:https://pan.baidu.com/s/1wG1vlg2v12za48IuPVovJg  

    使用方法:按Ctrl+~ 选择历史粘贴对象。


原文:https://blog.csdn.net/kzadmxz/article/details/81413141
背景:在Mac上向linux上拷文件时,想和Win一样贴上全路径,怎么得到文件的全路径?

mac下如何复制文件路径:  option+command+C

查看文件的文件路径快捷键:option+command+p键

如何查看问件的时间:shift + command + p

From: https://blog.csdn.net/cdqn10086/article/details/70216350
在macos下安装ansible主要有三种方法,建议采用源码安装的方法安装ansible。
brew安装(需要安装homebrew模块)
brew install ansible

From: https://www.jianshu.com/p/873975e0abb8
Demon:
code ~/.bashrc

根据终端命令行使用 bash 还是 zsh 选择编辑环境变量的文件。

bash,写入 ~/.bash_profile

zsh, 写入 ~/.zshrc

阅读全文
以下四条命令搞定,谁用谁知道



来自:https://blog.csdn.net/weixin_40545512/article/details/82685927
$git pull
hint: Waiting for your editor to close the file... fatal: cannot run /usr/local/bin/vim: No such file or directory
error: unable to start editor '/usr/local/bin/vim'
Not committing merge; use 'git commit' to complete the merge.


I tried to upgrade from the default vim install on Mac OS X (vim 7.2) to the one used by MacVim (vim 7.3) by creating a symlink:

alias vim=/usr/bin/vim

来自:https://apple.stackexchange.com/questions/14299/replaced-usr-bin-vim-now-i-get-error-messages
背影:买了个Mac本,无法用.vbs脚本,输入个密码啥的更快一些。
xiangdongAutoEnterPasswd*.py


secureCRT支持运行.js和.vbs以及.py格式的脚本,无奈mac上识别前两个格式的脚本只能写一写python脚本,
举个简单的例子,利用脚本直接ssh连接一台机器,
在View菜单中勾选Button Bar让这个菜单在下方显示出来,
在下方的Default右方右键出现一个菜单点击New Button按钮,在显示框的Function一栏选择Run Script中间选择编写好的.py文件
.py文件的内容大致如下:


另外一个:


来自:https://blog.csdn.net/medivhq/article/details/52119572
好不容易买个Mac,最近一段时间在使用 git log 和 git diff 命令的时候一直有乱码出现,具体表现为在行首出现 ESC[33,而在行尾出现 ESC[m,如下所示:


解决
经过搜索之后了解到,出现该问题的原因是 git 使用的默认分页程序是 less,而默认的直接运行 less 的话,会无法正确解析转义字符。但是如果以 -r 命令来运行 less 的话,就可以解决了。故解决办法就是将 git 的默认分页程序改为 “less -r” 来运行,如下:
git config --global core.pager "less -r" 后:
好了,买个Mac花了十年,用它得花一年。

Git log 和Git diff显示正常:

方向来自:https://blog.yongli1992.com/2015/08/14/git-log-diff-esc-garbled/
装在台式机上,先在笔记本上用一个USB给Win上用软件UltraISO把extix-19.1-64bit-kde-kodi18-refracta-calamares-nvidia-1970mb-181228.iso给写入硬盘映像,开机启动BIOS设置从这个U盘启动,然后,再用一个U盘给把这个extix-19.1-64bit-kde-kodi18-refracta-calamares-nvidia-1970mb-181228.iso给拷贝进去,再插入到台式机上,这个ExTix会自动识别为/dev/sdc,用fdisk -l也能看到,于是把这台式机的那个磁盘/dev/sda给格式化:
mkfs.ext4 /dev/sda


cp extix-19.0-64bit-deepin-refracta-calamares-kodi18-1760mb-181208.iso /dev/sda

重启,设置BIOS从台式机磁盘启动,OK。但是空间没有500G和之前U盘一样大,怎么办?
https://blog.csdn.net/huanghai381/article/details/50033775


From:https://www.extix.se/?page_id=24

ExTiX - The Ultimate Linux System
Based on Debian/Ubuntu with Deepin/LXQt/KDE and kernel 4.20-rc4
Deepin:  https://sourceforge.net/projects/extix/files/
https://cytranet.dl.sourceforge.net/project/extix/extix-19.0-64bit-deepin-refracta-calamares-kodi18-1760mb-181208.iso




./redis_keycount.sh 'SESS*'  
processing....
SESS*
./redis_keycount.sh



SESS* count:21798578
ok!

来自:https://studygolang.com/articles/14275?fr=sidebar
支持swoole的Xdebug版本:https://github.com/mabu233/sdebug支持swoole的Xdebug扩展



MacBook下面需要自己编译:
https://tekkie.ro/computer-setup/how-to-install-kcachegrind-qcachegrind-on-mac-osx/
https://blog.josephscott.org/2013/07/03/qcachegrind-kcachegrind-on-mac-os-x/

xdebug是和PHP的版本对应起来的,这一步很重要,如下:
https://xdebug.org/wizard.php
centos安装php版本对应的扩展xdebug链接:




使用图形分析工具wincachedgrind分析生成的文件

下载地址:http://sourceforge.net/projects/wincachegrind/files/

centos安装php扩展xdebug安装以及用kcachegrind系统分析
Download:
https://phoenixnap.dl.sourceforge.net/project/precompiledbin/kcachegrind.zip
kali linux:
Install kcachegrind Using apt
Update apt database with apt using the following command.

sudo apt update
After updating apt database, We can install kcachegrind using apt by running the following command:

sudo apt -y install kcachegrind

来自:https://installati.one/kalilinux/kcachegrind/

百度网盘。
实践发现:
找开kcachegrind文件时要以它的后缀结尾,直接贴进去地址就成。
之前的后缀是cache,现在修改一下它这个后缀即可:
xdebug.profiler_output_name="cachegrind.out.%H.%u.%s"
修改为:
xdebug.profiler_output_name="callgrind.out.%H.%u.%s"   #kcachegrind在Win下面只认这个前缀的才能打开分析,直接拖cachegrind.out*进去是打不开的。
解决kcachegrind在Win下面只认这个前缀的才能打开分析批量xdebug的文件重命名的办法:

shell下的文本替换,Shell字符串替换学习---武明瑶:https://jackxiang.com/post/9922/


mkdir -p /data/logs/xdebug
chown -R www /data/logs/xdebug
chmod -R 755 /data/logs/xdebug

打成RPM包的SPEC文件:




下载图形化工具kcachegrind在windows下的可执行版 下载地址http://sourceforge.net/projects/precompiledbin/files   用kcachegrind来看会更形象,注意需要修改从linux中执行的文件的php文件路径,这样就可以了sourcecode.
原文:https://blog.csdn.net/gdfjhc/article/details/84194948
Linux嵌入式由于诸多的限制,调试方法有限,常常出现面对Bug束手无策的情况,现在介绍一种通过信号处理对Linux嵌入式应用程序进行调试的方法。

linux中一共有32种信号,在/usr/include/bits/signum.h 头文件中可以看到,具体如下:SIGHUP ;SIGINT ;SIGQUIT ;SIGILL ;SIGTRAP ;SIGABRT ;SIGIOT ;SIGBUS ;SIGFPE ;SIGKILL ;SIGUSR1 ;SIGSEGV ;SIGUSR2 ;SIGPIPE ;SIGALRM ;SIGTERM ;SIGSTKFLT ;SIGCLD ;SIGCHLD ;SIGCONT ;SIGSTOP ;SIGTSTP ;SIGTTIN ;SIGTTOU ;SIGURG ;SIGXCPU ;SIGXFSZ ;SIGVTALRM ;SIGPROF ;SIGWINCH ;SIGPOLL ;SIGIO ;SIGPWR ;SIGSYS ;SIGUNUSED
以上来自:https://blog.csdn.net/u010133805/article/details/53899667 ,他用的c++,改成c研究研究,如下:

看编号,用kill -l,SIGUSR1编号为10,如下所示:
#kill -l
1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP
6) SIGABRT      7) SIGBUS       8) SIGFPE       9) SIGKILL     10) SIGUSR1
11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR
31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3
38) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7
58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX

其中SIGUSER1信号用户可以自己定义其处理行为,处理范例如下:

#make usr1
cc     usr1.c   -o usr1
./usr1

ps -ef|grep usr1

kill -s SIGUSR1 17331
sig_num=10
flag is true!
sig_num=10
flag is false
flag is false
Mac OS升级之后,使用Android studio 运行SVN出现如下错误:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
1
解决方式,打开命令行工具运行如下的命令:

xcode-select --install
---------------------
原文:https://blog.csdn.net/Zhangxichao100/article/details/76138145
分页: 15/339 第一页 上页 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 下页 最后页 [ 显示模式: 摘要 | 列表 ]