Ref: https://docs.drone.io/installation/github/single-machine/
Set callback URL in github http://your-drone-ci-host:port/login
| import { Button } from '@fluentui/react-components'; | |
| import { useCallback, useEffect, useRef, useState } from 'react'; | |
| const Metronome = () => { | |
| const [bpm, setBpm] = useState(120); // 每分钟节拍数 | |
| const [isPlaying, setIsPlaying] = useState(false); // 是否正在播放 | |
| const [volume, setVolume] = useState(50); // 音量 | |
| const audioContextRef = useRef<AudioContext | null>(null); // 音频上下文 | |
| const timerRef = useRef<number | null>(null); // 定时器引用 |
| version: '3' | |
| services: | |
| postgres: | |
| image: postgres:11 | |
| restart: always | |
| environment: | |
| - "POSTGRES_USER=postgres" | |
| - "POSTGRES_PASSWORD=postgres1234" | |
| - "POSTGRES_DB=gogs" |
| func dualPivotQuickSort(arr []int, start, end int) { | |
| if start < end { | |
| lp, rp := partition(arr, start, end) | |
| dualPivotQuickSort(arr, start, lp-1) | |
| dualPivotQuickSort(arr, lp+1, rp-1) | |
| dualPivotQuickSort(arr, rp+1, end) | |
| } | |
| } | |
| // partition split the slice into three parts with two pivots: |
Scritps: https://github.com/fuchsia-mirror/jiri/blob/master/scripts/bootstrap_jiri
From this script we can know the download URL can be got from: https://fuchsia-build.storage.googleapis.com/
Example (end with commit id)
fx script: https://github.com/fuchsia-mirror/scripts/blob/master/fx
| #!/bin/bash | |
| REPO_DIR=/tmp/my-git-repo | |
| git clone -b $SOURCE_BRANCH $SOURCE_REPO_URL $REPO_DIR && cd $REPO_DIR || exit 1 | |
| git remote add upstream $TARGET_REPO_URL && git fetch upstream $TARGET_REPO_BRANCH | |
| commit_ids=$(git cherry upstream/$TARGET_REPO_BRANCH | awk '{print $2}') | |
| cd - |
| package main | |
| // Just a sample code for learning mutex. Don't use this code for prodution. | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) |
| grep -rnwH ./ -e WIN32 | sed -e 's/\(.*\):[0-9+].*/\1/' | sort | uniq | grep -v Binary | xargs vim |