I hereby claim:
- I am dchenbecker on github.
- I am dchenbecker (https://keybase.io/dchenbecker) on keybase.
- I have a public key whose fingerprint is RETU RN T HIS. PGP. GET_ FING ERPR INT( ); }
To claim this, I am signing this object:
#!/bin/zsh | |
KS_HOME=/var/lib/unifi | |
cd $KS_HOME/certs | |
umask 0077 | |
print "Paste in the cert.pem file followed by Ctrl-D" | |
cat > unifi.crt | |
# Heavily based on Locate plugin by Ulrik Sverdrup <ulrik.sverdrup@gmail.com> | |
__kupfer_name__ = _("Recoll") | |
__kupfer_actions__ = ( | |
"Recoll", | |
) | |
__description__ = _("Search using Recoll") | |
__version__ = "" | |
__author__ = "Honza Strnad <hanny.strnad@gmail.com>" |
import scalaz.{ \/, -\/, \/-, \&/, Monoid } | |
import \&/._ | |
import scalaz.concurrent.Task | |
import scalaz.syntax.semigroup._ | |
import scalaz.stream.{ Process, Process1 } | |
import com.typesafe.scalalogging.Logger | |
object StreamReporting { |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
scala> import java.util.Properties | |
import java.util.Properties | |
scala> val defaults = new Properties | |
defaults: java.util.Properties = {} | |
scala> defaults.setProperty("test", "foo") | |
res8: java.lang.Object = null | |
scala> defaults.containsKey("test") |
if 'is down' in evt.message: | |
if evt.prodState == 501: #Pre-Populated | |
evt._action = 'drop' | |
if 'is up' in evt.message: | |
if evt.prodState == 501: #Pre-Populated | |
evt._action = 'status' | |
evt.severity = 5 |
object JPASpec extends Specification { | |
object EM extends LocalEMF("jpaSample") with ThreadLocalEM | |
"EntityManager" should { | |
setSequential() // Make sure that the following specs execute in order | |
"Add users" in { | |
println("running add users") | |
val user1 = new User("Ted") | |
val user2 = new User("Fred") |
class DefaultNullable<A,B> { | |
public delegate B MapFunc(A input); | |
private A underlying; | |
public DefaultNullable(A input) { | |
this.underlying = input; | |
} | |
public static implicit operator DefaultNullable<A,B>(A input) { |
scala> object PositiveInt { | |
| def unapply (input : String) = try { if (input.toInt > 0) Some(input.toInt) else None } catch { case _ ⇒ None } | |
| } | |
defined module PositiveInt | |
scala> List("foo","bar","14") match { | |
| case group :: user :: PositiveInt(id) :: Nil ⇒ println("%s:%s (%d)".format(group, user, id)) | |
| case _ ⇒ // NOP | |
| } | |
foo:bar (14) |