Skip to content

Instantly share code, notes, and snippets.

@jrudolph
jrudolph / ToLowerCase.scala
Created October 31, 2013 15:27
ToLowerCase
object Test extends App {
import DefaultJsonProtocol._
trait ToLowerCase
object ToLowerCase {
def apply(str: String): String with ToLowerCase = str.toLowerCase.asInstanceOf[String with ToLowerCase]
implicit val strWithToLowerCaseFormat: JsonFormat[String with ToLowerCase] =
new JsonFormat[String with ToLowerCase] {
def write(obj: String with ToLowerCase): JsValue = JsString(obj)
@elmer-garduno
elmer-garduno / RMQReceiver.scala
Created September 6, 2013 03:01
RabbitMQ Actor with Receiver
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@leostratus
leostratus / webkit-pseudo-elements.md
Created September 21, 2012 01:44
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@pmuellr
pmuellr / observe.js
Created August 17, 2012 16:15
cheap-ass kinda polly-fill for Object.observe
;(function(){
//------------------------------------------------------------------------------
if (typeof(Object.observe) == "function") {
console.log("object.observe() is already available")
return
}
//------------------------------------------------------------------------------
// observe property changes on an object