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
def printTable[A](rows: Seq[A], header: String*)(f: A => Seq[String]) = { | |
val rowsStrings = rows.map(f) | |
val cells = header +: rowsStrings | |
val widths = cells.transpose.map(_.map(_.length).max) | |
val format = widths.map("%-" + _ + "s").mkString(" | ") | |
val headerStr = format.format(header *) | |
val separator = widths.map("-" * _).mkString("-+-", "-+-", "-") | |
val rowsStr = rowsStrings.map(format.format(_ *)).mkString("\n") | |
println(s"$headerStr\n$separator\n$rowsStr") | |
} |
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
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh | |
# Aliases | |
alias g='git' | |
#compdef g=git | |
alias gst='git status' | |
#compdef _git gst=git-status | |
alias gd='git diff' | |
#compdef _git gd=git-diff | |
alias gdc='git diff --cached' |
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 kupasyomtov.igudbneitorah.scripts | |
import bleep.commands.Compile | |
import bleep.internal.{TransitiveProjects, jvmRunCommand} | |
import bleep.model.{CrossProjectName, ProjectName} | |
import bleep.{BleepFileWatching, BleepScript, Commands, FileWatching, PathOps, Started} | |
import java.io.File | |
import java.nio.file.Files | |
import scala.jdk.CollectionConverters.* |
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 amm | |
import scala.xml.{Elem, Node, Text, XML} | |
def quoteString(s: String) = | |
'"' + | |
s.replace("\n", "\\n").replace("\"", "\\\"") + | |
'"' |
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 scala.concurrent.duration.Duration | |
import scala.concurrent.{Await, ExecutionContext} | |
import slick.dbio.DBIO | |
import org.flywaydb.core.api.migration.{BaseJavaMigration, Context} | |
abstract class SlickMigration extends BaseJavaMigration { | |
implicit val executionContext: ExecutionContext = ExecutionContext.global |
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 java.io._ | |
import java.util.zip.ZipInputStream | |
import geny.Generator | |
import mill._ | |
import mill.define.Target | |
import mill.scalajslib._ | |
object WebpackLib { |
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 java.beans.Introspector | |
import java.nio.file.{Files, Paths} | |
object GenerateBeanCaseClass extends App { | |
val typeRenderings = Map[Class[_], String]( | |
classOf[String] -> "String", | |
classOf[Boolean] -> "Boolean", | |
classOf[Int] -> "Int" | |
) |
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 chesednow.requests.sjs | |
import japgolly.scalajs.react.Callback | |
import japgolly.scalajs.react.vdom.VdomNode | |
import cats.implicits._ | |
import monocle.{Iso, Prism} | |
trait PartialStateBase[V] { | |
type State |
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 java.sql.Types | |
import scala.annotation.tailrec | |
import scala.concurrent.Await | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration.Duration | |
import scala.meta._ | |
import slick.dbio.DBIO | |
import slick.jdbc.meta.{MColumn, MQName, MTable} |
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
[1/547] mill.scalalib.ZincWorkerModule.compilerInterfaceClasspath | |
[2/547] mill.scalalib.ZincWorkerModule.classpath | |
[4/547] shared_common.js.upstreamCompileOutput | |
[5/547] shared_common.js.sources | |
[6/547] shared_common.js.generatedSources |
NewerOlder