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 kotlin | |
// The next line also works | |
///usr/bin/env kotlin "$0" "$@" ; exit $? | |
// It is allowed to declare dependencies from Maven repositories | |
@file:DependsOn("com.hexagonkt:http_server_netty:3.1.0") | |
@file:DependsOn("com.hexagonkt:serialization_jackson_json:3.1.0") | |
import com.hexagonkt.http.server.netty.serve | |
import com.hexagonkt.core.logging.logger |
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 java --enable-preview --source 20 -cp "*" "$0" "$@" ; exit $? | |
/* | |
* Requires flatlaf-3.2.jar on the same directory | |
* You can also remove '-cp "*"' from the 'shebang' and use the CLASSPATH variable instead: | |
* CLASSPATH="*" ./Scripting.java | |
*/ | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.InputStreamReader; |
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 com.intellij.openapi.fileEditor.FileEditorManager | |
import com.intellij.openapi.project.Project | |
import com.intellij.openapi.project.ProjectManager | |
import com.intellij.openapi.ui.popup.JBPopupFactory | |
import com.intellij.openapi.wm.ToolWindowManager | |
val popupFactory: JBPopupFactory = JBPopupFactory.getInstance() | |
val projectManager: ProjectManager = ProjectManager.getInstance() | |
val windowProject: Project = projectManager.openProjects[0] |
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 kotlin | |
@file:Suppress( | |
"USELESS_IS_CHECK", | |
"FunctionName", | |
"PackageDirectoryMismatch", | |
"UnusedImport", | |
"unused", | |
"RedundantNullableReturnType", | |
"ReplaceManualRangeWithIndicesCalls", |