This is not necessary anymore, see this comment: DataDog/dd-trace-java#931 (comment)
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>PATH</key> | |
<string>/opt/homebrew/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin</string> | |
</dict> | |
<key>KeepAlive</key> |
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
server { | |
listen 8080; | |
server_name .${REDIRECT_FROM}; | |
return 301 $scheme://${REDIRECT_TO}$request_uri; | |
} |
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
// usage example | |
includeTree { | |
module("app") { | |
dir("domain") { | |
module("domain-api") | |
module("domain-impl") | |
} | |
dir("persistence) { | |
module("persistence-api") |
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
SELECT nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
LEFT OUTER JOIN pg_inherits I ON (C.relfilenode = I.inhrelid OR C.relfilenode = I.inhparent) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
AND C.relkind <> 'i' | |
AND nspname !~ '^pg_toast' | |
AND I.inhrelid is null | |
UNION ALL |
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 kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.slf4j.MDCContext | |
import kotlinx.coroutines.withContext | |
import org.slf4j.MDC | |
inline fun <T> withMdc(vararg attributes: Pair<String, Any?>, block: () -> T): T { | |
val oldAttributes = MDC.getCopyOfContextMap() ?: emptyMap() | |
attributes.forEach { (key, value) -> | |
value?.apply { | |
MDC.put(key, toString()) |
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 datadog.trace.api.DDTags | |
import io.opentracing.Span | |
import io.opentracing.Tracer | |
import io.opentracing.log.Fields | |
import io.opentracing.tag.Tags | |
import io.opentracing.util.GlobalTracer | |
suspend fun <T : Any, O> T.coRunTraced( | |
methodName: String, | |
block: suspend T.(Span) -> O, |
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
# using tput commands | |
FGBLK=$( tput setaf 0 ) # 000000 | |
FGRED=$( tput setaf 1 ) # ff0000 | |
FGGRN=$( tput setaf 2 ) # 00ff00 | |
FGYLO=$( tput setaf 3 ) # ffff00 | |
FGBLU=$( tput setaf 4 ) # 0000ff | |
FGMAG=$( tput setaf 5 ) # ff00ff | |
FGCYN=$( tput setaf 6 ) # 00ffff | |
FGWHT=$( tput setaf 7 ) # ffffff |
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
{ | |
"description": "ctrl/command swap", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com\\.jetbrains\\.intellij$" | |
], | |
"type": "frontmost_application_if" |