This is a short write-up of my experiences with installing Debian on a ThinkPad W540.
All commands should be run as root, unless indicated otherwise.
package main | |
import ( | |
"strings" | |
"path/filepath" | |
) | |
func fileNameWithoutExtension(fileName string) string { | |
return strings.TrimSuffix(fileName, filepath.Ext(fileName)) | |
} |
import Debug.Trace | |
debug :: Show a => String -> a -> a | |
debug description value = | |
trace (description ++ ": " ++ show value) value |
func openbrowser(url string) { | |
var err error | |
switch runtime.GOOS { | |
case "linux": | |
err = exec.Command("xdg-open", url).Start() | |
case "windows": | |
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start() | |
case "darwin": | |
err = exec.Command("open", url).Start() |
This is a short write-up of my experiences with installing Debian on a ThinkPad W540.
All commands should be run as root, unless indicated otherwise.
package com.thoughtworks.futureeither | |
import concurrent.{Await, Future} | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import concurrent.duration.FiniteDuration | |
import java.util.concurrent.TimeUnit | |
class FutureEither[L, R](private val future: Future[Either[L, R]]) { | |
def flatMap[R2](block: R => FutureEither[L, R2]): FutureEither[L, R2] = { |