Skip to content

Instantly share code, notes, and snippets.

View jiminoc's full-sized avatar

Jim Plush jiminoc

View GitHub Profile
class MyServletSpec extends MutableScalatraSpec {
tester.getContext.setInitParameter("env", "prod")
addServlet(classOf[MyServlet], "/*")
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
class MyTest extends MutableScalatraSpec {
addServlet(classOf[MyServlet], "/*")
"calling query should" should {
"set the status code" in {
get("/query") {
println(response.getContent)
status mustEqual 200
class MyTest extends MutableScalatraSpec {
addServlet(classOf[MyServlet], "/*")
"calling query should" should {
"set the status code" in {
get("/query") {
println(response.getContent)
status mustEqual 200
object Settings {
var field1:String = _
var field2:String = _
def load(config:Config) {
field1 = config.getString("field1")
field2 = config.getString("field2")
}
}
import zmq
context = zmq.Context()
# Socket to talk to server
print "Connecting to server"
socket = context.socket(zmq.REQ)
socket.connect ("tcp://127.0.0.1:5559")
print 'Client started'
poll = zmq.Poller()
// create a pool of workers who will do the work
val worker = system.actorOf(Props[ZWorker].withRouter(
RoundRobinRouter(nrOfInstances = 10)),
name = "testworker")
val subSocket = system.newSocket(SocketType.Pull, Listener(listener), Connect("tcp://127.0.0.1:1235"), SubscribeAll)
TRACE com.gravity.goose.Crawler - crawler: STARTING TO RELEASE ALL RESOURCES
=======================::. ARTICLE REPORT .::======================
URL: http://www.nytimes.com/2011/09/20/arts/design/preserving-the-american-folk-art-museums-place-in-new-york.html?_r=1&ref=arts
TITLE: Preserving the American Folk Art Museum’s Place in New York
IMAGE: http://graphics8.nytimes.com/images/2011/09/20/arts/20folkart-web/20folkart-web-articleLarge.jpg
IMGKIND: bigimage
CONTENT: Please. Someone, everyone, do something to save the American Folk Art Museum from dissolution and dispersal. Or at least slow down the process, so that all options can be thoroughly considered. New York’s contemporary artists, and New York as a whole, need the creative energy of this stubborn, single-minded little institution, its outstanding exhibition program and its wondrous collection, an unparalleled mixture of classic American folk art and 20th-century outsider geniuses. At the moment it almost seems that the m
<p class="textBodyBlack"><span id="byLine"></span></p>
<table cellpadding="0" cellspacing="0" border="0" width="1%" align="left" style="padding:5 15 0 0;">
<tr>
<td><img src="http://media.cnbc.com/i/CNBC/Sections/News_And_Analysis/__Story_Inserts/graphics/__FEDERAL_RESERVE/FED_RESERVE3.jpg" border="0" align="Left" height="150" width="200" vspace="0" hspace="0" /></td>
</tr>
</table>
<b><strong>
<a href="/id/44612678/"><strong>The Federal Reserve’s Operation Twist </strong></a></strong></b>was everything it was cracked up to be, and even a bit more.
<p class="textBodyBlack">
<span id="byLine"></span>
<table cellpadding="0" cellspacing="0" border="0" width="1%" align="left" style="padding:5 15 0 0;">
<tr>
<td>
<img src="http://media.cnbc.com/i/..Shortened for brevity>
</td>
</tr>
</table>
<b><strong>