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 akka.amqp._ | |
import akka.amqp.AMQP._ | |
import akka.util.Logging | |
object TacoProducer extends Logging { | |
val connection = AMQP.newConnection() | |
val exchangeParameters = ExchangeParameters("tacotruck", Direct, | |
ActiveDeclaration(durable=true, autoDelete=false)) |
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
<!DOCTYPE html> | |
<!-- test --><!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]--><!--[if IE 7]> <html class="no-js ie7" lang="en"> <![endif]--><!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]--><!--[if IE 9]> <html class="no-js ie9" lang="en"> <![endif]--><!--[if gt IE 9]><!--><html class="no-js lift:H5BP.lang" lang="en"><!--<![endif]--><head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<title class="lift:Menu.title">App: </title> | |
<script class="lift:Html5Shiv"></script> | |
<style class="lift:CSS.blueprint"></style> | |
<style class="lift:CSS.fancyType"></style> | |
<script id="jquery" src="/classpath/jquery.js" type="text/javascript"></script> |
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 akka.unfiltered | |
import akka.actor._ | |
import akka.dispatch.Future | |
import akka.pattern.ask | |
import akka.util.duration._ | |
import akka.util.Timeout | |
import unfiltered.Async | |
import unfiltered.request._ |
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
<?php | |
/** | |
* A thin kestrel client that wraps Memcached (libmemcached extension) | |
* | |
* @author Bill Shupp <[email protected]> | |
* @copyright 2010-2011 Empower Campaigns | |
*/ | |
class EC_KestrelClient | |
{ | |
/** |
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
<?php | |
/** | |
* Interface for adding jobs to a queue server | |
* | |
* @author Bill Shupp <[email protected]> | |
* @copyright 2010-2011 Empower Campaigns | |
*/ | |
class EC_Producer | |
{ | |
/** |
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
#!/bin/env php | |
<?php | |
// External application bootstrapping | |
require_once __DIR__ . '/cli_init.php'; | |
// Instantiate and run the consumer | |
$consumer = new EC_Consumer($argv); | |
$consumer->run(); |
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
<?php | |
/** | |
* Enterprise queue consumer interface, called by bin/consumer_cli.php | |
* | |
* @author Bill Shupp <[email protected]> | |
* @copyright 2010-2011 Empower Campaigns | |
*/ | |
class EC_Consumer | |
{ |
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
<?php | |
$producer = new EC_Producer(); | |
$producer->addJob('hello_world', 'HelloWorld', array('foo' => 'bar')); | |
?> |
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
// https://github.com/scalaz/scalaz/blob/master/core/src/main/scala/scalaz/Lens.scala | |
case class Lens[A,B](get: A => B, set: (A,B) => A) { | |
def apply(a: A) = get(a) | |
// ... | |
} |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<script id="searchResultTemplate" type="text/x-jquery-tmpl"> | |
{{each(i,result) hits}} |
OlderNewer