I hereby claim:
- I am benjishults on github.
- I am benjishults (https://keybase.io/benjishults) on keybase.
- I have a public key whose fingerprint is 1974 71B9 AF07 216D A15C 52C2 32FA 983E 9B0D EF24
To claim this, I am signing this object:
import kotlinx.coroutines.* | |
/** | |
* Demonstrating that all coroutines are canceled even though I'm throwing away all the [kotlinx.coroutines.CancellationException]s | |
*/ | |
suspend fun main() { | |
try { | |
coroutineScope { | |
val job1 = launch { | |
val job4 = launch { |
package benjishults.traits | |
import java.time.Instant | |
interface Auditable { | |
val created: Instant | |
val lastModified: Instant | |
companion object : (Instant, Instant?) -> Auditable { | |
override fun invoke(created: Instant, lastModified: Instant?): Auditable = |
package benjishults.pra | |
// when people claim it takes 300 pages to prove that 2+2=4, show them this: | |
// definition of non-negative integers | |
sealed interface NonNegativeInteger { | |
// every non-negative integer has a successor | |
fun successor(): PositiveInteger = | |
PositiveInteger(this) |
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false, | |
"unsafe_ui": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# put this file in the folder containing your repo folders. | |
# when run, it will try to do a git pull upstream of the current branch of each repo and print a message on each failure. | |
pushd . &> /dev/null | |
for dir in $( find . -maxdepth 1 -type d -print ) | |
do | |
popd &> /dev/null | |
pushd "$dir" &> /dev/null |
#!/bin/bash | |
# put this file in the folder containing your repo folders. | |
# when run, it will check whether there is a stash in the current branch | |
pushd . &> /dev/null | |
for dir in $( find . -maxdepth 1 -type d -print ) | |
do | |
popd &> /dev/null; | |
pushd "$dir" &> /dev/null; |
public static void main(String[] args) { | |
Path file = Path.of(args[0]); | |
processorFactory(file).processFile(file); | |
} |
public class TextProcessor implements Processor { | |
@Override | |
public void processFile(Path file) { | |
System.out.println("process text file"); | |
} | |
} |
public enum DocumentType implements Processor { | |
TXT("txt", "text") { | |
@Override | |
public void processFile(Path file) { | |
System.out.println("process text file"); | |
} | |
}, | |
MD("md", "markdown") { | |
@Override | |
public void processFile(Path file) { |