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/sh | |
# Abort script at first error, when a command exits with non-zero status | |
# (except in until or while loops, if-tests, list constructs) | |
set -e | |
# Attempt to use undefined variable outputs error message, and forces an exit | |
set -u | |
# Similar to verbose mode (-v), but expands commands | |
#set -x |
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/sh | |
# Determine where intellij is installed | |
DEFAULT_IDEA_TOOLBOX_LOCATION=$(ls -1d ~/Library/Application\ Support/JetBrains/Toolbox/apps/*/*/*/IntelliJ\ IDEA.app 2>&1 | tail -n1) | |
DEFAULT_IDEA_LOCATION=$(ls -1d /Applications/IntelliJ\ IDEA.app 2>&1 | tail -n1) | |
IDEA="" | |
if [[ $DEFAULT_IDEA_TOOLBOX_LOCATION = *"No such file or directory"* ]]; then | |
IDEA="$DEFAULT_IDEA_LOCATION" | |
elif [[ $DEFAULT_IDEA_LOCAITON = *"No such file or directory"* ]]; then |
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
val sample: (X, Y, Z) -> Int = multiReceiver { { { x + y + z } } } | |
fun <A, B, C, R> multiReceiver(f: A.() -> B.() -> C.() -> R) = { a: A, b: B, c: C -> f(a)(b)(c) } | |
class X(val x: Int) | |
class Y(val y: Int) | |
class Z(val z: Int) |