This re-styles your sublime text sidebar to be dark, it fits default Monokai theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
Based on:
This re-styles your sublime text sidebar to be dark, it fits default Monokai theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
Based on:
brew update | |
brew versions FORMULA | |
cd `brew --prefix` | |
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
brew install FORMULA | |
brew switch FORMULA VERSION | |
git checkout -- Library/Formula/FORMULA.rb # reset formula | |
## Example: Using Subversion 1.6.17 | |
# |
import java.io.{File, FileInputStream, FileOutputStream} | |
import monix.eval.Task | |
import monix.execution.Ack | |
import monix.execution.Ack.{Continue, Stop} | |
import monix.reactive.{Consumer, Observable, Observer} | |
import scala.util.control.NonFatal | |
def copyFile(input: File, destination: File, chunkSize: Int): Task[Unit] = | |
Task.defer { | |
val in = new FileInputStream(input) |
#!/bin/sh | |
# place this file at: /etc/hotplug.d/iface/99-login-telekom_fon | |
# based on source: https://gist.github.com/cusspvz/3ab1ea9110f4ef87f0d2e1cd134aca67 | |
# | |
# loginscript for german telekom_FON hotspot (NOT the general Telekom Hotspot) | |
# technic: uses HTTP POST formular; extract URLs from WIPSr | |
# | |
# Preparations |
// Please comment in case of typos or bugs | |
import scala.slick.driver.H2Driver._ | |
val db = Database.for...(...) | |
case class Record( ... ) | |
class Records(tag: Tag) extends Table[Record](tag,"RECORDS"){ | |
... | |
def * = ... <> (Record.tupled,Record.unapply) | |
// place additional methods here which return values of type Column |
// originally by @SethTisue, see http://stackoverflow.com/questions/40622878/how-do-i-tell-sbt-to-use-a-nightly-build-of-scala-2-11-or-2-12/40622879#40622879 | |
resolvers += "nightlies" at "https://scala-ci.typesafe.com/artifactory/scala-release-temp/" | |
scalaVersion := { | |
val propsUrl = new URL("https://scala-ci.typesafe.com/job/scala-2.12.x-integrate-bootstrap/lastSuccessfulBuild/artifact/jenkins.properties/*view*/") | |
val props = new java.util.Properties | |
props.load(propsUrl.openStream) | |
props.getProperty("version") | |
} | |
scalaBinaryVersion := "2.12" |
import Stream._ | |
/** A possibly finite stream that repeatedly applies a given function to a start value. | |
* | |
* @param start the start value of the stream | |
* @param f the function that's repeatedly applied | |
* @return the stream returning the possibly finite sequence of values `start, f(start), f(f(start)), ...` | |
*/ | |
def iterate[A](f: A => A, a: A): Stream[A] = unfold((x: A) => Some((x, f(x))), a) |
// optionally filter on a column with a supplied predicate | |
case class MaybeFilter[X, Y](val query: scala.slick.lifted.Query[X, Y]) { | |
def filter[T](data: Option[T])(f: T => X => scala.slick.lifted.Column[Boolean]) = { | |
data.map(v => MaybeFilter(query.filter(f(v)))).getOrElse(this) | |
} | |
} | |
// example use case | |
def find(id: Option[Int], createdMin: Option[Date], createdMax: Option[Date], modifiedMin: Option[Date], modifiedMax: Option[Date]) = { |
scala> import cats.implicits._ | |
import cats.implicits._ | |
scala> (1 -> 2) === (1 -> 3) | |
res0: Boolean = true | |
scala> import scala.reflect.runtime.universe._ | |
import scala.reflect.runtime.universe._ | |
scala> showCode(reify { (1 -> 2) === (1 -> 3) }.tree) |
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |