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 java.time.Instant | |
import java.util.concurrent.Executors | |
import java.util.concurrent.TimeUnit | |
import java.util.concurrent.atomic.AtomicInteger | |
fun main(args: Array<String>) { | |
val c = AtomicInteger(10) | |
Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate({ -> | |
println(Instant.now()) | |
if (c.decrementAndGet() > 0) Thread.sleep(2000) |
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
<template name="todo" value="// TODO [$WHO$ $WHEN$] - $END$" description="ToDo" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
<variable name="WHO" expression="user()" defaultValue="" alwaysStopAt="true" /> | |
<variable name="WHEN" expression="date()" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="JAVA_CODE" value="true" /> | |
<option name="KOTLIN" value="true" /> | |
</context> | |
</template> |
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
<template name="test" value="@org.junit.Test fun `$TEST_NAME$`() { $END$ }" description="JUnit Test" toReformat="true" toShortenFQNames="true" useStaticImport="true"> | |
<variable name="TEST_NAME" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
</context> | |
</template> |
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
<template name="wip" value="@WorkInProgress(until="$UNTIL$", by="$WHO$", someConfigurationsMayPass = $WILL_IT_PASS$) " description="@WorkInProgress" toReformat="false" toShortenFQNames="true"> | |
<variable name="UNTIL" expression="date()" defaultValue="" alwaysStopAt="true" /> | |
<variable name="WHO" expression="user()" defaultValue="" alwaysStopAt="true" /> | |
<variable name="WILL_IT_PASS" expression="" defaultValue=""true"" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
</context> | |
</template> |
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
#!/bin/bash | |
# | |
# scale-gnome: Utiltity for HDPI screens. Gnome settings only support integer scale values. This uses xrandr to scale to fractional values. | |
# | |
usage() { | |
cat << EOF | |
Usage: scale-gnome [-o|--output <output>] [-d|--dry-run] <scale> | |
-o, --output: The xrandr output of the display to update. If not provided the output for the first connected screen found is used. |