bear 月与灯依旧 2024-04-08 Set up self-hosted runners for Github Actions Add and Install a new runner on our host Highly recommand run self-hosted runner as a systemd service # Save settings ./config.cmd --url https://github.com/XXX/MyApp --token XXXXXXXXX # Lets's deploy a systemd service # Refer: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service sudo ./svc.sh install Then, we will see these below Run as user: zhang3 Run as uid: 1000 gid: 1000 Created symlink /etc #编程学习 #git #Github
bear 月与灯依旧 2024-01-12 Javascript Array Handle element in an Array const hobbies = ["sports", "cooking", "reading"]; console.log(hobbies[0]); # Get single element hobbies.push("surfing"); # Add new element to the end hobbies.unshift("movies"); # Add new element to th start hobbies.pop(); # remove the last element hobbies.shift(); # remove the first element Find element const index = hobbies.findIndex((item) => { return item === "reading" }); console.log(index); A shorter code: const index = hobbies.findIndex((item) => item === #编程学习 #javascript