Skip to content

Instantly share code, notes, and snippets.

View cvogt's full-sized avatar

Jan Christopher Vogt cvogt

  • Symbiont.io
View GitHub Profile
@dks77
dks77 / 99-login-german-fon
Last active October 10, 2021 00:12 — forked from cusspvz/99-login-fon
Telekom_FON Hotspot: auto-login bash script wget germany wispr client openwrt
#!/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
@adriaanm
adriaanm / nightly.sbt
Created December 11, 2016 19:13
How to use the latest Scala nightly build from your sbt build by @SethTisue
// 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 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)
@pedrofurla
pedrofurla / git-branches-by-commit-date.sh
Created November 4, 2016 18:59 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# 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
@paulp
paulp / failures
Last active August 12, 2016 22:37
testing coursier as a drop-in replacement
origin https://github.com/gitbucket/gitbucket (fetch)
origin https://github.com/gitbucket/gitbucket (push)
Aug 08 18:50:38 Downloaded https://repo1.maven.org/maven2/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar
Aug 08 18:50:38 Downloaded https://repo1.maven.org/maven2/com/typesafe/slick/slick_2.11/2.1.0/slick_2.11-2.1.0.jar
Aug 08 18:50:38 [info] Fetched artifacts of io.github.gitbucket:gitbucket_2.11:4.3.0
Aug 08 18:50:40 coursier.ResolutionException: 1 not found https://repo1.maven.org/maven2/org/apache/sshd/apache-sshd/1.2.0/apache-sshd-1.2.0.jar
Aug 08 18:50:40 [error] (*:update) coursier.ResolutionException: 1 not found https://repo1.maven.org/maven2/org/apache/sshd/apache-sshd/1.2.0/apache-sshd-1.2.0.jar
Aug 08 18:50:40 [error] Total time: 10 s, completed Aug 8, 2016 6:50:40 PM
@pedrofurla
pedrofurla / chrome
Created July 8, 2016 15:42
Bash/AppleScripts to open or reload chrome
open /Applications/Google\ Chrome.app --args --allow-file-access-from-files --unlimited-quota-for-files
import scalatags.Text.all._
import collection.mutable
// http://flatuicolors.com/
val red = "#c0392b"
val green = "#27ae60"
val yellow = "#f39c12"
val blue = "#2980b9"
val magenta = "#8e44ad"
val cyan = "#16a085"
val black = "#000"
@etorreborre
etorreborre / implicits.scala
Created May 25, 2016 06:35
Show applied implicits in the REPL
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)
"biz.enef" %% "slogging-slf4j" % "0.3"
"biz.enef" %% "surf-akka" % "0.0.1"
"bound" %% "bound-core" % "1.3.0"
"bound" %% "bound-f0-binding" % "1.3.0"
"bound" %% "bound-scalacheck-binding" % "1.3.0"
"com.elderresearch" %% "monadic-jfx" % "0.1.0"
"com.geteit" %% "geteit-app" % "0.1"
"com.geteit" %% "geteit-utils" % "0.3"
"com.github.gearzero" %% "slick-threeten-mapper" % "0.1.0"
"com.github.imapi" %% "spark-sqs-receiver" % "1.0.1"
@etorreborre
etorreborre / mini.scala
Created June 3, 2015 00:35
Minimal spec based on specs2
import org.specs2._
import execute._
import specification._
import core._
class TestSuite(tests: Fragment*) extends Specification {
def is = br ^ Fragments.foreach(tests)(f => Fragments(f, br))
}
object TestSuite {