Skip to content

Instantly share code, notes, and snippets.

@oluies
oluies / Proxy.scala
Created October 3, 2011 07:08 — forked from gkossakowski/Proxy.scala
ScalaProxy example
package test;
import java.lang.{reflect => jreflect}
import scala.reflect.mirror._
/**
* Scala counterpart of java.lang.reflect.InvocationHandler
*/
trait InvocationHandler {
def invoke(proxy: AnyRef, method: Symbol, args: Array[AnyRef]): AnyRef
@zachstronaut
zachstronaut / gist:1184900
Created August 31, 2011 22:22
Stretch HTML5 canvas to fill window, preserving aspect ratio
/**
* fullscreenify()
* Stretch canvas to size of window.
*
* Zachary Johnson
* http://www.zachstronaut.com/
*
* See also: https://gist.github.com/1178522
*/