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
| import org.assertj.core.api.Assertions.assertThatThrownBy | |
| import org.junit.jupiter.api.Test | |
| @Test | |
| fun `test exception1 - AssertionJ`() { | |
| assertThatThrownBy { | |
| // lambda λΆλΆμ λλ€. μ€νν μ½λλ₯Ό μμ±ν©λλ€. | |
| val list = listOf(1, 2, 3, 4) | |
| list.get(100) | |
| } |
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
| const https = require('https'); | |
| exports.handler = async (event) => { | |
| console.log("event: ", event); | |
| const options = { | |
| hostname: "gist.github.com", // replace correctly | |
| port: 443, | |
| path: '/v1/articles', // replace correctly | |
| method: 'POST', |
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
| enum class TeaType { | |
| GREEN_TEA, HERBAL_TEA | |
| ; | |
| fun String.snakeToLowerCamelCase(): String { | |
| val snakeRegex = "_[a-zA-Z]".toRegex() | |
| return snakeRegex.replace(this.lowercase()) { | |
| it.value.replace("_","") | |
| .uppercase() | |
| } |
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
| ipv4_set = [] | |
| ipv6_set = [] | |
| with open("ip-table.csv") as f: | |
| for row in f: | |
| ip = row.split(',')[0] | |
| if ':' in ip: | |
| ip += '/128' | |
| ipv6_set.append(ip) | |
| else: | |
| if ip.count('.') == 3: # to ignore header |
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
| pipeline { | |
| agent any | |
| stages { | |
| stage('GitClone') { | |
| steps { | |
| git url: 'https://github.com/nobel6018/pubsub-study.git' | |
| } | |
| } |