Skip to content

Instantly share code, notes, and snippets.

View caryyu's full-sized avatar
😀
Welcome to AMA!

: ask me anything :) caryyu

😀
Welcome to AMA!
View GitHub Profile
@caryyu
caryyu / README.md
Created February 7, 2021 10:20
Lark notification in Jenkinsfile

Script

Please use the script below as a shell command and save to /usr/local/bin/lark in the execution environment

#!/usr/bin/env bash

action=$1
url=$2
@caryyu
caryyu / main.go
Last active October 18, 2021 04:00
Algorithm of QuickSort
package main
import "fmt"
func main() {
var nums []int = []int{6, 1, 2, 7, 9, 3, 4, 5, 10, 8}
quicksort(nums, 0, len(nums)-1)
fmt.Println(nums)
}
@caryyu
caryyu / main.go
Created September 24, 2021 07:52
Algorithm of Heapsort
package main
import "fmt"
func main() {
var nums []int = []int{57, 40, 38, 11, 13, 34, 48, 75, 6, 19, 9, 7}
heapsort(nums)
fmt.Println(nums)
}
@caryyu
caryyu / main.go
Created September 26, 2021 10:01
Algorithm of Shellsort
package main
import "fmt"
func main() {
var nums []int = []int{3, 2, 1, 2, 5, 9, 8, 6, 7}
shellsort(nums)
fmt.Println(nums)
}
@caryyu
caryyu / main.go
Created September 30, 2021 05:21
Algorithm of mergesort
package main
import "fmt"
func main() {
var nums []int = []int{10, 7, 8, 1, 4, 3}
topDownMergesort(nums)
fmt.Println(nums)
}
@caryyu
caryyu / On-Alicloud.md
Created November 5, 2022 12:24
Using Certbot to create HTTPS certificates

Ensure the domain resolution is managed by the alicloud.

Create

docker run -it --rm \
-e "ALIYUN_AK=<access_key>" \
-e "ALIYUN_SK=<secret_key>" \
-e "EMAIL=<contact email>" \
-v /var/local/certs:/etc/letsencrypt acbig/certbot-dns-aliyun:1.0.0 obtain_cert \
@caryyu
caryyu / 404.html
Created November 15, 2022 12:22
HTML Common Templates
<!DOCTYPE html><html lang="en"><head><style type="text/css">*{transition: all 0.6s;}html {height: 100%;}body{font-family: 'Lato', sans-serif;color: #888;margin: 0;}#main{display: table;width: 100%;height: 100vh;text-align: center;}.fof{display: table-cell;vertical-align: middle;}.fof h1{font-size: 50px;display: inline-block;padding-right: 12px;animation: type .5s alternate infinite;}@keyframes type{from{box-shadow: inset -3px 0px 0px #888;}to{box-shadow: inset -3px 0px 0px transparent;}}</style></head><body><div id="main"><div class="fof"><h1>Oops, (-4o4-) Not Found.</h1></div></div></body></html>