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
import kotlin.random.Random.Default.nextInt | |
fun main() { | |
println(generatePassword(16)) | |
} | |
fun generatePassword(length: Int): String { | |
require(length > 8) { "password length must be longer than 8 characters." } | |
val lowerChars = ('a'..'z').toList() | |
val upperChars = ('A'..'Z').toList() |
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 main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) | |
func main() { |
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
import org.springframework.http.HttpMethod | |
import org.springframework.http.server.reactive.ServerHttpRequest | |
import org.springframework.http.server.reactive.ServerHttpRequestDecorator | |
import org.springframework.stereotype.Component | |
import org.springframework.web.server.ServerWebExchange | |
import org.springframework.web.server.ServerWebExchangeDecorator | |
import org.springframework.web.server.WebFilter | |
import org.springframework.web.server.WebFilterChain | |
import reactor.core.publisher.Mono |
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
### Keybase proof | |
I hereby claim: | |
* I am cho0o0 on github. | |
* I am c_cho (https://keybase.io/c_cho) on keybase. | |
* I have a public key ASA2_e4pZ94__YIv4LBysWlOvu5iSvWyXtaU93eCfzCPZAo |
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
const generateAccesskey = (method, password, ip, port) => { | |
const firstPart = btoa(`${method.toLowerCase()}:${password}`) | |
const secondPart = `${ip}:${port}` | |
const accesskey = `ss://${firstPart}@${secondPart}` | |
return accesskey | |
} |