docker日志清理

sudo truncate -s 0  /var/lib/docker/containers/420f0b682e656a5aa3a8e56507c8ec9abde66474a5d6dfd68a4aa4477a3860f1/420f0b682e656a5aa3a8e56507c8ec9abde66474a5d6dfd68a4aa4477a3860f1-json.log

linux 修改时间

  1. date命令:查看当前时间

  2. date -s 完整日期时间(YYYY-MM-DD hh:mm[:ss]):修改日期、时间

注意时间要加引号

3.hwclock -w
将时间写入bios避免重启失效。

gitlab报500问题修复

Enter the DB console:

For Omnibus GitLab packages:

sudo gitlab-rails dbconsole

Reset CI/CD variables

Drop the table:

DELETE FROM ci_group_variables;
DELETE FROM ci_variables;

Reset Runner registration tokens

-- Clear project tokens
UPDATE projects SET runners_token = null, runners_token_encrypted = null;
-- Clear group tokens
UPDATE namespaces SET runners_token = null, runners_token_encrypted = null;
-- Clear instance tokens
UPDATE application_settings SET runners_registration_token_encrypted = null;
-- Clear runner tokens
UPDATE ci_runners SET token = null, token_encrypted = null;

Reset pending pipeline jobs

-- Clear build tokens
UPDATE ci_builds SET token = null, token_encrypted = null;

更新配置
gitlab-ctl reconfigure

ADB 指令

停止应用

adb shell am force-stop ${applicationId}

打开设置

adb shell am start -a android.settings.SETTINGS

拉取文件

adb pull /sdcard/xxx/ .

打开应用

adb shell am start -n "${applicationId}/${带包名的Activity}" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

拉取系统日志

adb logcat > log.txt

卸载应用并保留数据

adb shell pm uninstall -k ${包名}

替换安装

adb install -r ${文件路径}

相关链接

玩转ADB命令(ADB命令使用大全)