This file contains 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 | |
regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' | |
for var in "$@" | |
do | |
files="encoded_image=@$var" | |
# if this is a gif, get the first frame | |
if [[ $var =~ \.(gif|mp4)$ ]]; then | |
tempfile="$TMPDIR$(uuidgen).jpg"; |
This file contains 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
.cardImageContainer { | |
background-size: cover; | |
} | |
.paper-icon-button-img { | |
object-fit: cover; | |
max-height: 1.72em; | |
} | |
.fldImage img { | |
height: 103px; | |
object-fit: cover; |
This file contains 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
@echo off | |
setlocal EnableDelayedExpansion | |
echo ================[ Getting web page ]================ | |
set URL=%1 | |
if NOT "%URL:~-1%" == "/" ( | |
set URL="%URL%/" | |
) | |
echo 'url: %URL%' | |
for /f "tokens=4 delims=/" %%a in ("%URL%") do ( |
This file contains 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 pwsh | |
param ($URI, $Proxy, $Extra) | |
$ErrorActionPreference = 'Stop' | |
$SaveName = 'notFoundName' | |
function isURI($address) { | |
$null -ne ($address -as [System.URI]).AbsoluteURI | |
} | |
function getExe { | |
return (Get-Item N_*.exe -Exclude '*SimpleG*').fullname |
对于mTLS的配置的证书来说,有如下的提示。
-
三个文件。 对于大多数系统,如:MySQL, Redis,PostgreSQL。会需要三个文件:CA证书 + CERT 和 KEY。可以在我的这个开源项目(https://github.com/haoel/mTLS/tree/main/certs )中找到我生成的CA,以及 Server 和 Client的
.crt
和.key
文件。生成的方法也在我的那个开源项目中了。 -
两个文件。 对于有的系统,比如:MongoDB,他只要两个文件,一个是CA,一个是 pem 文件,对于pem文件,你可以直接把上面的 .crt 和 .key 合并了就好了。如:cat server.crt server.key > server.pem
-
JKS文件。 对于一些系统,比如:Kafka 和 Zookeeper。他要的不是上面的明文的格式,他要的是一种jks的格式,这是Java的格式。怎么从上面的明文的方式转到jks的文件。需要经过下面几步。
This file contains 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 com.pers.test.post; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.beans.BeansException; | |
import org.springframework.beans.factory.config.BeanDefinition; | |
import org.springframework.beans.factory.config.BeanFactoryPostProcessor; | |
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; |
This file contains 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
[SERVICE] | |
flush 1 | |
log_level info | |
parsers_file parsers_multiline.conf | |
[INPUT] | |
name tail | |
path /var/log/brewery-monolith.log | |
read_from_head true | |
multiline.parser multiline-regex-test |