Skip to content

Instantly share code, notes, and snippets.

@TheYkk
TheYkk / conventional_commit_messages.md
Created November 4, 2021 22:38 — forked from qoomon/conventional_commit_messages.md
Conventional Commit Messages

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@TheYkk
TheYkk / vault_api_transit_secrets.md
Created October 29, 2021 13:51 — forked from ruanbekker/vault_api_transit_secrets.md
Vault: Create Secrets with Vaults Transits Secret Engine

Description

Vault's transit secrets engine handles cryptographic functions on data-in-transit. Vault doesn't store the data sent to the secrets engine, so it can also be viewed as encryption as a service

Enable:

Enable transit secret engine using the /sys/mounts endpoint:

@TheYkk
TheYkk / Makefile
Created July 21, 2021 20:24 — forked from thomaspoignant/Makefile
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@TheYkk
TheYkk / Makefile
Created July 21, 2021 20:24 — forked from thomaspoignant/Makefile
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@TheYkk
TheYkk / aws-region-names.go
Created May 10, 2021 21:19 — forked from c1982/aws-region-names.go
AWS region names with bill region names
type AwsRegion struct {
Region string
Location string
Code string
A1 string
}
var (
regions = []AwsRegion{
// NewWrapResponseWriter wraps an http.ResponseWriter, returning a proxy that allows you to
// hook into various parts of the response process.
func NewWrapResponseWriter(w http.ResponseWriter, protoMajor int) WrapResponseWriter {
_, fl := w.(http.Flusher)
bw := basicWriter{ResponseWriter: w}
if protoMajor == 2 {
_, ps := w.(http.Pusher)
if fl && ps {
package main
import (
"context"
"flag"
image2 "github.com/aquasecurity/fanal/artifact/image"
"github.com/aquasecurity/fanal/cache"
"github.com/aquasecurity/fanal/image"
dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
"github.com/aquasecurity/trivy/pkg/log"
@TheYkk
TheYkk / test.sh
Created February 1, 2021 10:28 — forked from developer-guy/test.sh
Display Kubernetes OpenAPI Spec
#!/usr/bin/env bash
set -e
# Proxy minikube to localhost on arbitrary port:
kubectl proxy --port=8080 &
sleep 3
# Now swagger.json is available at localhost:12345/openapi/v2
# Save to /tmp/temp/json and serve with e.g. docker swagger-ui container
curl http://localhost:8080/openapi/v2 > /tmp/temp.json
docker container run -d -p 9999:8080 -e SWAGGER_JSON=/var/specs/temp.json -v /tmp/temp.json:/var/specs/temp.json swaggerapi/swagger-ui
@TheYkk
TheYkk / worker.js
Created July 24, 2020 14:55 — forked from maxkostinevich/worker.js
Serverless Geolocation Service
/*
* Serverless Geolocation Service, hosted on Cloudflare Workers.
*
* Learn more at https://maxkostinevich.com/blog/serverless-geolocation
*
* (c) Max Kostinevich / https://maxkostinevich.com
*/
// https://gist.github.com/maephisto/9228207
@TheYkk
TheYkk / README.md
Created August 12, 2019 15:08 — forked from denji/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000