Skip to content

Instantly share code, notes, and snippets.

View yejianfengblue's full-sized avatar

Blue Ye yejianfengblue

View GitHub Profile
@yejianfengblue
yejianfengblue / arch_install
Last active April 21, 2024 14:51
arch_install
sudo dd bs=4M status=progress oflag=sync if=archlinux-2024.04.01-x86_64.iso of=/dev/sda
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@192.168.31.200
# setup China mirrors
systemctl stop reflector
# or systemctl mask reflector
echo 'Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
Server = https://mirrors.aliyun.com/archlinux/$repo/os/$arch
Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist
@yejianfengblue
yejianfengblue / rotate.scad
Created June 11, 2022 02:21
rotate 45 degree with center point (0, -50) in openscad
// the red cube is the original object I'm going to transform
color("red")
cube([10, 10, 10], center = true);
// my goal is, in work plane XY, rotate the cube in the path of a circle whose center point is (0, -50) and radius is 50mm, rotate angle is 45 degree clockwise
// openscad rotate function always rotate with world coordinate center point (0, 0, 0)
// so step 1, move the cube to (0, 50, 0) by translate 50mm in y axis, the result is the green cube
color("green")
translate([0, 50, 0]) {
cube([10, 10, 10], center = true);
@yejianfengblue
yejianfengblue / appium-server-android-5.log
Created March 22, 2021 14:19
Appium UiAutomator2 mjpeg server doesn't work on Android 5.1.1
2021-03-22 22:17:40:185 [Appium] Welcome to Appium v1.20.2
2021-03-22 22:17:40:186 [Appium] Non-default server args:
2021-03-22 22:17:40:186 [Appium] port: 4000
2021-03-22 22:17:40:187 [Appium] logFile: /home/k/appium-r3.log
2021-03-22 22:17:40:187 [Appium] logTimestamp: true
2021-03-22 22:17:40:187 [Appium] localTimezone: true
2021-03-22 22:17:40:205 [Appium] Appium REST http interface listener started on 0.0.0.0:4000
2021-03-22 22:18:02:821 [HTTP] Request idempotency key: d36de0f9-2cf2-40d5-9076-0ddb1404c449
2021-03-22 22:18:02:845 [HTTP] --> POST /wd/hub/session
2021-03-22 22:18:02:845 [HTTP] {"capabilities":{"firstMatch":[{"platformName":"Android","appium:automationName":"uiautomator2","appium:udid":"r3:5555","appium:mjpegScreenshotUrl":"http://r3:7810","appium:newCommandTimeout":600,"appium:noReset":true}]},"desiredCapabilities":{"platformName":"Android","automationName":"uiautomator2","udid":"r3:5555","mjpegScreenshotUrl":"http://r3:7810","newCommandTimeout":600,"noReset":true}}
@yejianfengblue
yejianfengblue / appium-server.log
Last active March 22, 2021 14:13
If set capability appium:mjpegServerPort to custom port 12345, the UiAutomator2 mjpeg server still starts on port 7810. https://discuss.appium.io/t/does-appium-uiautomator2-mjpeg-server-always-start-on-port-7810/33317
# test case 2.1
# mjpegServerPort = 12345, mjpegScreenshotUrl port is 12345
2021-03-22 21:45:28:313 [HTTP] Request idempotency key: c64b41cf-9201-4343-8585-5a15f098488d
2021-03-22 21:45:28:320 [HTTP] --> POST /wd/hub/session
2021-03-22 21:45:28:320 [HTTP] {"capabilities":{"firstMatch":[{"platformName":"Android","appium:automationName":"uiautomator2","appium:udid":"m4:5555","appium:mjpegServerPort":12345,"appium:mjpegScreenshotUrl":"http://m4:12345","appium:newCommandTimeout":600,"appium:noReset":true}]},"desiredCapabilities":{"platformName":"Android","automationName":"uiautomator2","udid":"m4:5555","mjpegServerPort":12345,"mjpegScreenshotUrl":"http://m4:12345","newCommandTimeout":600,"noReset":true}}
2021-03-22 21:45:28:321 [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","automationName":"uiautomator2","udid":"m4:5555","mjpegServerPort":12345,"mjpegScreenshotUrl":"http://m4:12345","newCommandTimeout":600,"noReset":true},null,{"firstMatch":[{"platformName":"Android","appium:au
@yejianfengblue
yejianfengblue / appium-server.log
Last active March 22, 2021 14:13
Appium UiAutomator2 mjpeg server starts even though capability appium:mjpegServerPort is not set. See https://discuss.appium.io/t/does-appium-uiautomator2-mjpeg-server-always-start-on-port-7810/33317
2021-03-22 21:31:52:612 [Appium] Welcome to Appium v1.20.2
2021-03-22 21:31:52:613 [Appium] Non-default server args:
2021-03-22 21:31:52:613 [Appium] port: 4000
2021-03-22 21:31:52:613 [Appium] logFile: /home/k/appium-m4.log
2021-03-22 21:31:52:614 [Appium] logTimestamp: true
2021-03-22 21:31:52:614 [Appium] localTimezone: true
2021-03-22 21:31:52:632 [Appium] Appium REST http interface listener started on 0.0.0.0:4000
2021-03-22 21:31:59:421 [HTTP] Request idempotency key: dee40678-80de-4f8c-9339-15bde812eb38
2021-03-22 15:36:08:686 [Appium] Welcome to Appium v1.20.2
2021-03-22 15:36:08:687 [Appium] Non-default server args:
2021-03-22 15:36:08:687 [Appium] logFile: /home/k/appium.log
2021-03-22 15:36:08:687 [Appium] logTimestamp: true
2021-03-22 15:36:08:688 [Appium] localTimezone: true
2021-03-22 15:36:08:709 [Appium] Appium REST http interface listener started on 0.0.0.0:4723
2021-03-22 15:36:20:532 [HTTP] Request idempotency key: d0551b73-03e3-4188-b0b2-2364f8d53f8d
2021-03-22 15:36:20:554 [HTTP] --> POST /wd/hub/session
2021-03-22 15:36:20:555 [HTTP] {"capabilities":{"firstMatch":[{"platformName":"Android","appium:automationName":"uiautomator2","appium:udid":"r3:5555","appium:mjpegScreenshotUrl":"http://r3:8080/stream.mjpeg","appium:skipDeviceInitialization":true,"appium:skipServerInstallation":true,"appium:newCommandTimeout":600,"appium:noReset":true}]},"desiredCapabilities":{"platformName":"Android","automationName":"uiautomator2","udid":"r3:5555","mjpegScreenshotUrl":"http://r3:8080/stream.mjpeg","ski
@yejianfengblue
yejianfengblue / appium-server.log
Last active September 1, 2020 10:34
appium-server.log for find element by image 20 times
[Appium] Welcome to Appium v1.18.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[debug] [HTTP] Request idempotency key: 58c12667-b155-412e-9849-08e01c931876
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{"platformName":"Android","appium:platformVersion":"23","appium:automationName":"uiautomator2","appium:deviceName":"n2","appium:udid":"n2:5555","appium:newCommandTimeout":3600,"appium:noReset":true}]},"desiredCapabilities":{"platformName":"Android","platformVersion":"23","automationName":"uiautomator2","deviceName":"n2","udid":"n2:5555","newCommandTimeout":3600,"noReset":true}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","platformVersion":"23","automationName":"uiautomator2","deviceName":"n2","udid":"n2:5555","newCommandTimeout":3600,"noReset":true},null,{"firstMatch":[{"platformName":"Android","appium:platformVersion":"