- Enable 32-bit architecture:
sudo dpkg --add-architecture i386| --- | |
| kind: pipeline | |
| type: kubernetes | |
| name: some-pipeline | |
| steps: | |
| - name: build_cache | |
| image: plugins/docker | |
| settings: | |
| registry: some-registry.com |
Just plug in your own values for registry and repo/image name.
registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
curl -sSL -I \
-H "Accept: application/vnd.docker.distribution.manifest.v2+json" \| package main | |
| import ( | |
| "fmt" | |
| "github.com/gabriel-vasile/mimetype" | |
| ) | |
| func main() { | |
| testBytes := []byte("This random text has a MIME type of text/plain; charset=utf-8.") |
| package join | |
| import ( | |
| "fmt" | |
| "strings" | |
| "testing" | |
| ) | |
| var ( | |
| testData = []string{"a", "b", "c", "d", "e"} |
| import socket, struct | |
| from ipaddress import ip_address, ip_network | |
| # 错误代码,由于网络字节序为大字节序,而此代码试图使用小字节序处理掩码,因此当掩码不是刚好8的倍数时就会判断错误 | |
| def addr_in_network_wrong(ip, net_n_bits): | |
| ipaddr = struct.unpack('<L', socket.inet_aton(ip))[0] | |
| net, bits = net_n_bits.split('/') | |
| netaddr = struct.unpack('<L', socket.inet_aton(net))[0] | |
| netmask = ((1L << int(bits)) - 1) | |
| return ipaddr & netmask == netaddr & netmask |
| #!/bin/bash | |
| output=$1 | |
| if [ -z "$output" ]; then | |
| output="profile.svg" | |
| fi | |
| # assume that the top usage program is python program, or you can customize the top command | |
| # using head/tail to get the top 1 line (the first 8 are headers) |
| import ( | |
| "github.com/gin-gonic/gin" | |
| ) | |
| type QueryMap map[string]any | |
| func ParseQuery(c *gin.Context) (QueryMap, error) { | |
| query := make(QueryMap) | |
| if c.Request.Method == "GET" { | |
| for k, v := range c.Request.URL.Query() { |