Skip to content

Instantly share code, notes, and snippets.

Binary Mgmt

bin install <url>

bin list
+ Pros
   + aaaa
   + bbbb
- Cons
   - no
   - no no
@YooWaan
YooWaan / ca.sh
Created October 19, 2022 14:24
my-ca
function gen() {
ca_subj=$1
cert_subj=$2
name=$3
day=$4
# create ca
openssl req -new -x509 -nodes -days ${day} -subj "/CN=$ca_subj" -keyout ${name}ca.key -out ${name}ca.crt
# private key
openssl genrsa -out ${name}.key
@YooWaan
YooWaan / opa-ht.sh
Last active August 16, 2022 00:30
openapi json to html shell
version="4.13.2"
while getopts "f:u:s:h" OPTION
do
case ${OPTION} in
f) flag="f"
oapi=${OPTARG}
;;
u) flag="u"
{ source : {name:"bandit", url:"https://bandit.readthedocs.io/en/latest/"}, message: .issue_text, code: { value: .code, url: .issue_cwe.link}, location: { path: .filename, range: {start: {line: .line_number, column: .col_offset}} }, serverity: .issue_severity }
@YooWaan
YooWaan / railroad.svg
Created July 23, 2021 05:07
railroad svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@YooWaan
YooWaan / CMakeList.txt
Last active May 1, 2021 02:37
My CMake Note
cmake_minimum_required(VERSION 3.20)
project( my_app CXX )
# lib
add_library( other OBJECT src/other.cpp)
# add_library( other STATIC src/other.cpp )
target_include_directories( other PRIVATE ./inc)
target_compile_options( other PUBLIC -w -Wall )
target_compile_features( other PUBLIC cxx_std_17)
@YooWaan
YooWaan / doom-d-config.el
Last active September 5, 2020 13:43
my emacs doom
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
(setq user-full-name "WooYooWaan"
user-mail-address "my-address@yoowaan.me")
@YooWaan
YooWaan / main.go
Last active January 19, 2020 08:17
golang atomic, mutext bench
package main
import (
"sync"
"sync/atomic"
)
var mutex sync.Mutex
var value atomic.Value
@YooWaan
YooWaan / commit-msg
Last active September 16, 2019 12:56
git-conventinal-or-semantic-comits
#!/bin/bash
typ="$(head -n 1 "$1" | grep -Eo '^[A-Za-z_\-]+(\([^)]+\))*!?:' | grep -o '^[A-Za-z_\-]*')"
case "$typ" in
"fix" | "feat" | "refactor" | "docs" | "test" | "style" | "perf" | "build" | "release" | "snipet" | "security" )
printf "%b%s%b\\n" "\\033[32;1m" "commit $typ" "\\033[0m"
;;
*)
printf "%b%s%b\\n" "\\033[31;1m" "unsupported commit type [${typ}] !!!" "\\033[0m"