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
---------------------------------------------------- | |
#!/usr/bin/env bash | |
# place in a file called email-unit-status.sh on the PATH | |
# requires you to have set /etc/admin-email to contain the address to receive the messages | |
# requires install of ansi2html | |
# | |
set -e |
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
<idea-plugin> | |
<id>dev.hydraulic.hshell</id> | |
<name>Hydraulic Shell</name> | |
<vendor email="[email protected]" url="https://hshell.hydraulic.dev">Hydraulic</vendor> | |
<description><![CDATA[ | |
Hydraulic Shell is a replacement for shell scripting that uses Kotlin. | |
]]></description> | |
<depends>com.intellij.modules.platform</depends> |
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 hydraulic.hshell.intellij | |
import com.intellij.notification.NotificationGroupManager | |
import com.intellij.notification.NotificationType | |
import com.intellij.openapi.diagnostic.logger | |
import java.io.File | |
import java.io.IOException | |
import kotlin.script.experimental.intellij.ScriptDefinitionsProvider | |
private val LOG = logger<HShellDefinitionProvider>() |
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 hydraulic.kotlin.utils | |
import kotlin.contracts.ExperimentalContracts | |
import kotlin.contracts.InvocationKind | |
import kotlin.contracts.contract | |
/** | |
* A wrapper class that makes it harder to forget to take a lock before accessing some shared state. | |
* | |
* Simply define an anonymous object to hold the data that must be grouped under the same lock, and then pass it |
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
// A config for Conveyor (https://conveyor.hydraulic.dev/) that creates a download site for GitHub Desktop. | |
// Shows how to package a real-world and sophisticated Electron app. | |
include required("/stdlib/electron/electron.conf") | |
// Import package.json files so we can avoid duplicating config. There are two in this project. | |
package-json { | |
include required("app/package.json") | |
} |
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
#!/usr/bin/env hshell | |
// -------------------- Dependencies and imports ------------------------------------------------ | |
// | |
// You can depend on Maven coordinates, they will be downloaded and cached in ~/.m2 automatically. | |
@file:DependsOn("com.github.ricksbrown:cowsay:1.0.0") | |
import com.github.ajalt.mordant.table.table | |
import com.github.ricksbrown.cowsay.Cowsay | |
import hydraulic.utils.os.runningOnWindows |
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
// A server config for Conveyor: https://conveyor.hydraulic.dev/ | |
// Import config from a Java build system (but you can get it from anywhere). | |
include required("#!gradle -q printConveyorConfig") | |
app { | |
vendor = Hydraulic | |
fsname = sample-server | |
machines = [linux.amd64.glibc] // Don't want packages for other platforms. |
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
[Unit] | |
After=postgresql.service | |
Description=JetBrains TeamCity | |
Requires=postgresql.service | |
Wants=network-online.target | |
# Can be included to allow a server to write to its own files. | |
[Service] | |
CacheDirectory=jetbrains/teamcity | |
ConfigurationDirectory=jetbrains/teamcity |
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 hydraulic.utils.config | |
import com.natpryce.hamkrest.assertion.assertThat | |
import com.natpryce.hamkrest.containsSubstring | |
import com.typesafe.config.Config | |
import com.typesafe.config.ConfigException | |
import com.typesafe.config.ConfigFactory | |
import com.typesafe.config.ConfigValueFactory | |
import org.junit.jupiter.api.Assertions.assertEquals | |
import org.junit.jupiter.api.Assertions.assertNull |
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 hydraulic.utils.config | |
import com.natpryce.hamkrest.isBlank | |
import com.typesafe.config.* | |
import com.typesafe.config.ConfigException.BadValue | |
import hydraulic.kotlin.utils.text.camelToKebabCase | |
import hydraulic.utils.app.UserInput | |
import java.lang.reflect.ParameterizedType | |
import java.lang.reflect.Type | |
import java.lang.reflect.WildcardType |
NewerOlder