软件、配置相关随手笔记

android 仓库:

buildscript {
    repositories {
        // 阿里云云效仓库:https://maven.aliyun.com/mvn/guide
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        // 华为开源镜像:https://mirrors.huaweicloud.com
        maven { url 'https://repo.huaweicloud.com/repository/maven' }
        // JitPack 远程仓库:https://jitpack.io
        maven { url 'https://jitpack.io' }
        // MavenCentral 远程仓库:https://mvnrepository.com
        mavenCentral()
        google()
        jcenter()
    }
}

allprojects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://repo.huaweicloud.com/repository/maven' }
        maven { url 'https://jitpack.io' }
        mavenCentral()
        google()
        jcenter()
    }
}

油猴:

https://github.com/the1812/Bilibili-Evolved 配合aria2


brew mysql 启动关闭:

==> mysql
We've installed your MySQL database without a root password. To secure it run:
    mysql_secure_installation

MySQL is configured to only allow connections from localhost by default

To connect run:
    mysql -uroot

To start mysql:
  brew services start mysql
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/mysql/bin/mysqld_safe --datadir=/usr/local/var/mysql


/usr/local/Cellar/mysql/bin/mysql.server start  
/usr/local/Cellar/mysql/bin/mysql.server stop

brew 替换仓库:

方案一(阿里):
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-cask.git

方案二(腾讯):
cd "$(brew --repo)"
git remote set-url origin https://mirrors.cloud.tencent.com/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.cloud.tencent.com/homebrew/homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"
git remote set-url origin https://mirrors.cloud.tencent.com/homebrew/homebrew-cask.git
腾讯需要下面这个,还原的时候需要移除`HOMEBREW_BOTTLE_DOMAIN`
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.cloud.tencent.com/homebrew-bottles' >> ~/.zshrc

设置好后:
source ~/.zshrc
brew update-reset
brew update
brew upgrade

还原:
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git

mac ipv6 开关:

sudo networksetup -setv6off Wi-Fi
sudo networksetup -setv6automatic Wi-Fi

电报中文:

tg://setlanguage?lang=zh-hans-raw


nexus:

mac仓库本地路径:
/usr/local/var/nexus/blobs/default/content
慢慢找,名字我对应也看不出来,但是确实是在这里的。

忘记密码:

cmm 关闭后台运行

chmod 400 "/Applications/CleanMyMac X.app/Contents/Library/LoginItems/CleanMyMac X Menu.app/Contents/Library/LoginItems/CleanMyMac X HealthMonitor.app/Contents/MacOS/CleanMyMac X HealthMonitor"

chmod 400 "/Applications/CleanMyMac X.app/Contents/Library/LoginItems/CleanMyMac X Menu.app/Contents/Library/LaunchServices/com.macpaw.CleanMyMac4.Agent"

chmod 400 "/Applications/CleanMyMac X.app/Contents/Library/LaunchServices/com.macpaw.CleanMyMac4.Agent"


android studio 代码报红,编译运行却好着

是不是用的gradle6.1.1?
换到新的6.8.3试试,网上那些复制粘贴我真是服了,都自己试过没有么,啥玩意啊?浪费大家时间。

IDEA Failed to load JVM DLL,PS 应用程序无法正常启动0xc00000022

当IDEA 出现Failed to load JVM DLL 错误的时候,网上都说什么jdk没配置对,或者32位,64位没有对应上什么的,我并不是这种问题,然后找了半天解决了,记录一下.
(其实直接右键管理员是可以打开的,只不过我不想..)

1. 下载并使用【DirectX修复工具】,修复DirectX组件,还需要选项c++强力修复选项.
2. 管理员权限命令行执行sfc /scannow.
3. 重启ok.
4. 如果还不行,用修复工具把已有的卸载掉然后所有的都重新在装一遍就行。
5. 下载地址:https://blog.csdn.net/vbcom/article/details/7245186

parallels desktop 中安装manjaro安装parallels tools踩坑

如果安装了内核头,将看到该输出中的版本。
安装或更新内核头
通常,系统内核头的版本应该对应于内核本身的版本,
检查Manjaro系统内核的版本:
`pacman -Q | grep headers`
uname命令检查内核版本
`uname -r`
前两个数字记住`5.10`。
安装内核头的所需版本
`sudo pacman -S linux-headers`
再次安装tools就好了

ubuntu 使用 clash

clash-linux-amd64-v1.6.5
https://github.com/Dreamacro/clash/releases
解压后,chmod +x clash,./clash
初始化执行 clash 会默认在 ~/.config/clash/ 目录下生成配置文件和全球IP地址库:config.yaml 和 Country.mmdb
服务商给的配置粘贴到yaml中
浏览器打开http://clash.razord.top/#/proxies
然后网络代理设置

ubuntu 卸载游戏

sudo apt purge iagno lightsoff four-in-a-row gnome-robots pegsolitaire gnome-2048 hitori gnome-klotski gnome-mines gnome-mahjongg gnome-sudoku quadrapassel swell-foop gnome-tetravex gnome-taquin aisleriot && sudo apt autoremove

ubuntu oracle jdk

sudo mkdir -p /usr/lib/jvm
sudo tar -zxvf jdk-8u181-linux-x64.tar.gz -C /usr/lib/jvm


ubuntu android studio报错

Execution failed for task ':xxx:externalNativeBuildDebug'.
 Build command failed.
  Error while executing process xxx

处理方案:

sudo apt install apt-file
sudo apt-file update
sudo apt-file find libncurses.so.5
sudo apt install libncurses5

如果是arch或者manjaro:yay ncurses5-compat-libs,如果没有yay就装一下。
fedora(我是陆陆续续装了这么多,也不知道那个起作用了):

sudo yum install ncurses ncurses-devel ncurses-libs ncurses-libs.i686   ncurses-devel.i686 
sudo yum install libncurses5   
sudo yum install ncurses-libs.i686 libstdc++.i686 libgcc.i686   
sudo dnf install ncurses-compat-libs

android studio 侧面gradle点开后没有task列表

preferences → Experimental → 取消勾选 “Do not build Gradle task list during Gradle sync”

sublime text标签页打开文件

preferences → setting 
"open_files_in_new_window": false,

mac big sur jd-gui报错

20210512更新: jd-gui疯狂闪退,放弃jd-gui,使用jadx,直接命令jadx jadx-gui也凑合用

ERROR launching 'JD-GUI'
No suitable Java version found on your system!
This program requires Java 1.8+
Make sure you install the required Java version.

解决方案:
jd-gui → 显示包内容 → Content → MacOS → universalJavaApplicationStub
内容替换为
https://raw.githubusercontent.com/tofi86/universalJavaApplicationStub/master/src/universalJavaApplicationStub中的内容
重新打开jd-gui


idea 或 as 查看 bytecode



$JDKPath$\bin\javap
-c -verbose $FileClass$
$OutputPath$

mac idea修改vmoption导致无法启动

方法1. 删除 /Users/xxx/Library/Application Support/JetBrains/IntelliJIdea2021.1 下的idea.vmoptions即可
方法2. cd /Users/shihchieh_ma/Library/Application Support/Google/AndroidStudio2020.3/studio.vmoptions
vi studio.vmoptions
PS: 旧版本在...Library/Preferences/AndroidStudio版本

ubuntu android studio权限问题无法更新

Studio does not have write access to /opt/android-studio-4.2/android-studio. 
Please run it by a privileged user to update

输入命令修改权限,注意目录对应上as的提示。

sudo chown -R $USER:$USER /opt/android-studio-4.2/android-studio


jetbrains 产品 一直试用,刷新试用

添加插件仓库
https://plugins.zhile.io
http://plugins.zhile.io
安装ide eval reset
重启应用
勾上auto reset before per restart

manjaro jdk as 终端透明

sudo cp -pr jdk1.8.0_291 /opt
sudo nano /etc/profile
JAVA_HOME=/opt/jdk1.8.0_291
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
sudo ln -s /opt/jdk1.8.0_291/bin/java /usr/bin/java
sudo pacman -Syu
sudo pacman -S snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install android-studio --classic
yay -S gnome-terminal-transparency
// gnome scale
https://wiki.archlinux.org/title/HiDPI#GNOME

mac pd ubuntu ssh

1. `ifconfig`记录ip
2. `sudo apt-get install openssh-server`
3. `sudo systemctl enable ssh.service`
4. `/etc/init.d/ssh start`
5. `[email protected]`

ubuntu 登录后到桌面的一闪而过的紫色处理

https://www.reddit.com/r/Ubuntu/comments/enj348/what_is_this_purple_screen_between_login_and/


android Build 信息

https://www.jianshu.com/p/af99b0e4866a#comments

StringBuilder sb = new StringBuilder();
sb.append("主板:" + Build.BOARD + "\n");
sb.append(
        "系统启动程序版本号:" + Build.BOOTLOADER + "\n");
sb.append(
        "系统定制商:" + Build.BRAND + "\n");
sb.append("cpu指令集:" + Build.CPU_ABI + "\n");
sb.append(
        "cpu指令集2" + Build.CPU_ABI2 + "\n");
sb.append(
        "设置参数: " + Build.DEVICE + "\n");
sb.append(
        "显示屏参数:" + Build.DISPLAY + "\n");
sb.append(
        "无线电固件版本:" + Build.getRadioVersion() + "\n");
sb.append(
        "硬件识别码:" + Build.FINGERPRINT + "\n");
sb.append(
        " 硬件名称: " + Build.HARDWARE + "\n");
sb.append(
        " HOST: " + Build.HOST + "\n");
sb.append(
        "  修订版本列表:" + Build.ID + "\n");
sb.append(
        "  硬件制造商:" + Build.MANUFACTURER + "\n");
sb.append(
        " 版本:" + Build.MODEL + "\n");
sb.append(
        "  硬件序列号:" + Build.SERIAL + "\n");
sb.append(
        " 手机制造商:" + Build.PRODUCT + "\n");
sb.append(
        " 描述Build的标签:" + Build.TAGS + "\n");
sb.append(
        "  TIME:" + Build.TIME + "\n");
sb.append(
        "  builder类型:" + Build.TYPE + "\n");
sb.append(
        "  USER:" + Build.USER + "\n");

debian源

# 163镜像站
deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
# 华为云镜像站
deb https://mirrors.huaweicloud.com/debian/ buster main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free
deb https://mirrors.huaweicloud.com/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free
# 腾讯云镜像站
deb http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb-src http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib
# 中科大镜像站
deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
# 阿里云镜像站
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
# 清华大学镜像站
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free
# 兰州大学镜像站
deb http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb http://mirror.lzu.edu.cn/debian/ buster-backports main contrib non-free
deb http://mirror.lzu.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian/ buster-backports main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian-security/ buster/updates main contrib non-free
# 上海交大镜像站
deb https://mirror.sjtu.edu.cn/debian/ buster main contrib non-free
deb https://mirror.sjtu.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirror.sjtu.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirror.sjtu.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ buster main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian-security/ buster/updates main contrib non-free

ubuntu 20.04 国内源

#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

#中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

#网易163源
deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse
#deb-src http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
#deb-src http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
#deb-src http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
#deb-src http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
#deb-src http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse

你可能感兴趣的:(软件、配置相关随手笔记)