Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
married

Vlad Patryshev vpatryshev

💭
married
View GitHub Profile
@vpatryshev
vpatryshev / EnvHacker.scala
Last active Aug 4, 2021 — forked from jaytaylor/EnvHacker.scala
Setting environment variables in Scala JVM
View EnvHacker.scala
import java.util.{Collections, Map => JavaMap}
import scala.collection.JavaConverters._
trait EnvHacker {
/**
* Portable method for setting env vars on both *nix and Windows.
* @see http://stackoverflow.com/a/7201825/293064
*/
def setEnv(newEnv: Map[String, String]): Unit = {
try {
@vpatryshev
vpatryshev / package.scala
Created Dec 16, 2015 — forked from zraffer/package.scala
a few operations with functors
View package.scala
package object types {
import scala.language.reflectiveCalls
import scala.language.higherKinds
// quantifiers aka (co)ends
type Forall[+F[_]] = { def apply[X]: F[X] }
type Exists[+F[_]] = F[_]
// basic categorical notions