This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Object | |
# invoke the method meth of the module mod | |
def mod_send(mod, meth, *args, &bloc) | |
if self.is_a? mod | |
mod.instance_method(meth).bind(self).call(*args, &bloc) | |
else | |
method_missing("#{mod}::#{meth}", *args, &bloc) | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net" | |
"fmt" | |
"flag" | |
"log" | |
) | |
var listenPort = flag.Int("port", 7331, "port") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$'\x65\x63\x68\x6f' $'\x4f\x68\x2c\x20\x73\x6f\x72\x72\x79\x20\x66\x6f\x72\x20\x74\x68\x65\x20\x63\x6f\x6e\x66\x75\x73\x69\x6f\x6e\x2c\x20\x79\x6f\x75\x27\x72\x65\x20\x6e\x6f\x74\x20\x61\x20\x68\x65\x72\x6f\x2c\x20\x79\x6f\x75\x27\x72\x65\x20\x6a\x75\x73\x74\x20\x70\x6c\x61\x69\x6e\x20\x73\x74\x75\x70\x69\x64\x2e' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.util.matching.Regex | |
object RubyRegex { | |
case class RubyMatcher(rx: Regex) extends AnyVal { // Value Class (no runtime overhead!) | |
def ===(str: String) = rx.findFirstIn(str).isDefined | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tests | |
import play.api._ | |
import play.api.libs.concurrent._ | |
import play.api.libs.iteratee._ | |
import scala.concurrent._ | |
import scala.concurrent.ExecutionContext.global | |
object TestEnum { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import play.api._ | |
import play.api.mvc._ | |
object Die { | |
def potato = "not today" | |
val iLikeTrain = ??? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My awesome question |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exemple de question |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> | |
<script src="https://gist.github.com/4635425.js"></script> | |
<script> | |
$(function(){ | |
$(".gist .gist-file").each(function(){ | |
var $file = $(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Coast to coast |
OlderNewer