This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
################### | |
# Containerd | |
################### | |
set -e | |
cd $(dirname $(realpath $0)) | |
mkdir -p tools && cd tools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//go:build ignore | |
package main | |
import ( | |
"log" | |
"os" | |
"reflect" | |
"text/template" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Security scan with trivy | |
security:trivy: | |
stage: security | |
variables: | |
GIT_STRATEGY: none | |
image: | |
name: $TRIVY_IMAGE_CUSTOM | |
entrypoint: [""] | |
cache: | |
key: trivy-cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"github.com/rytsh/call" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -it --name socat -p 2375:2375 -v /var/run/docker.sock:/var/run/docker.sock:ro alpine/socat tcp-listen:2375,fork,reuseaddr unix-connect:/var/run/docker.sock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"update":{ | |
"issuelinks":[ | |
{{range $i, $value := .issuelinks }} | |
{{- if $i}},{{ end }} | |
{ | |
"add":{ | |
"type":{ | |
"name":"Relates" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ~/configs/resolv.conf | cut -d' ' -f2 | xargs -I {} sh -c "timeout 0.5 nc -z {} 53 && echo Reachable {} || echo Not {}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
) | |
type test struct { | |
KeyValue map[string]interface{} `json:"-"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function check() { | |
# deep first search | |
for i in $(ls -d */ 2>/dev/null); do | |
( | |
cd ${i} | |
check ${@} | |
) | |
done | |
# execute command |
NewerOlder