分类目录归档:最后分类

mac已安装xcode但是某些应用提示未安装的解决办法

提示xcode没有安装

#显示“未能找到金属编译器安装的Xcode。请安装Xcode并运行Xcode.app来接受协议,或确保激活的开发者目录设为当前的Xcode安装(使用xcode-select)

接下来只需要确认安装步骤就可以了
确保 Xcode 的安装路径是 【/Applications/Xcode.app】

执行 xcode-select -p 看一下输出,如果不是 /Applications/Xcode.app/Contents/Developer,那么再执行

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

转移gitlab仓库到gerrit仓库

由于gerrit仓库可以配置权限,所以会比gitlab仓库多一些分支。

#1. git clone Gerrit空仓库
git clone "http://xxx@gerrit.xxxx.com:80/a/reponame"

#2. git remote set-url gitlab_url (旧仓库)
git remote set-url origin "https://xxx@git-server.xxx.ai/reponame.git"

#3. 拉取所有分支到本地
git fetch
git checkout master
git pull --allow-unrelated-histories


setopt interactivecomments
git branch -r > ../branch.txt
let count=0
while read br;
do
 let count=$count+1
 # echo "$count--$br"
 if [ $count -eq 1 ];then
  continue;
 fi
 br=`echo $br|sed -r "s/.*origin\/(.*)$/\1/g"`
 echo "==current branch : $br"
 git checkout "$br"
done < ../branch.txt

#4. git pull –all –allow-unrelated-histories#指定允许拉取不相关的代码过来Merge, 有多个分支时,要把多个分支都拉下来,注意用户名: git config username#注释: git pull = git fetch + git merge
git pull --all --allow-unrelated-historie

#5. git remote set-url Gerrit_url#(指定新 Gerrit 代码库的地址)
git remote set-url origin "http://xxx@gerrit.xxxx.com:80/a/reponame"

#6. git push -u origin –all#git push -u origin –tags#把代码推送给 Gerrit 仓库
git push --all ; git push --tags


mac升级big sur后微信不能截图(安全性隐私中屏幕录制的app为空)的解决方案

在系统升级之后,有时候会发生某个app突然没有了屏幕录制权限。表现为微信不能截屏(这个概率出现最高)。幸好你不是一个人(^_^还是有比较多的人遇到这个问题)有位外国朋友Andreas_Hegenberg就找到了个解决办法。

参考:https://community.folivora.ai/t/bug-cant-add-btt-to-mojave-privacy-security-settings/6688

继续阅读 mac升级big sur后微信不能截图(安全性隐私中屏幕录制的app为空)的解决方案

wordpress手动更新

#下载wpcli
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
#Next, check the Phar file to verify that it’s working:
php wp-cli.phar --info
#To use WP-CLI from the command line by typing wp, make the file executable and move it to somewhere in your PATH. For example:
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp --info
#手动下载Wordpress,上传到/tmp/wordpress.zip
cd wordpress的安装目录下
wp cli update /tmp/wordpress.zip
#更新core之后,再更新db
wp core update-db
继续阅读 wordpress手动更新