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 'dart:async'; | |
import 'dart:collection'; | |
FutureOr<T?> executeWithRetry<T>( | |
FutureOr<T?> Function() function, { | |
int maxRetries = 3, | |
int delayFactor = 2, // in seconds | |
throwIfFailed = true, | |
}) async { | |
int retries = 0; |
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.cubetiqs.rps.example; | |
import com.cubetiqs.sdk.rps.RpsClient; | |
import com.cubetiqs.sdk.shared.util.JsonUtil; | |
import com.cubetiqs.sdk.socketio.Utils; | |
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* @author sombochea |
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 dk.im2b | |
import java.io.OutputStream | |
import java.net.ServerSocket | |
import java.net.Socket | |
import java.nio.charset.Charset | |
import java.util.* | |
import kotlin.concurrent.thread | |
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.example.mytest; | |
import io.swagger.annotations.ApiOperation; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.core.annotation.AliasFor; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import org.springframework.web.bind.annotation.RestController; | |
import springfox.documentation.builders.PathSelectors; |
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
{ | |
"template": { | |
"name": "My template 1", | |
"source": "<#list data.getData() as item> <h1>${item.name}</h1> </#list> <br /> ${title} - ${sock.mind.title}" | |
}, | |
"dataSource": { | |
"type": "JSON", | |
"source": "[{\"name\": \"Sambo\"},{\"name\": \"Chea\"}]" | |
}, | |
"options": { |
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
{ | |
"configs": { | |
"title": "CUBETIQ Coperation Co,Ltd", | |
"headline": "Export Items", | |
"logoUrl": "https://visme.co/blog/wp-content/uploads/2017/08/40-Creative-Logo-Designs-to-Inspire-You-Movers-logo.jpg" | |
}, | |
"data": { | |
"invoiceNumber": "INV00001", | |
"date": "13-10-2020", | |
"time": "10:30 AM", |
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.cubetiqs.factory | |
import org.junit.jupiter.api.Assertions | |
import org.junit.jupiter.api.Test | |
class FactoryTests { | |
@Test | |
fun factoryTest() { | |
val carA = CarFactory(CarType.CAR_A).getCar() |
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
Regular expression cheat sheet for Varnish | |
Varnish regular expressions are NOT case sensitive. Varnish uses POSIX | |
regular expressions, for a complete guide, see: "man 7 regex" | |
Basic matching: | |
req.url ~ "searchterm" | |
True if req.url contains "searchterm" anywhere. | |
req.url == "searchterm" |
NewerOlder