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
// querulous-generic | |
import com.twitter.querulous.database.MemoizingDatabaseFactory | |
import com.twitter.querulous.evaluator.QueryEvaluator | |
import com.twitter.querulous.evaluator.QueryEvaluator._ | |
import com.twitter.querulous.evaluator.StandardQueryEvaluatorFactory | |
import com.twitter.querulous.database.ApachePoolingDatabaseFactory | |
import com.twitter.querulous.query.SqlQueryFactory | |
import com.twitter.xrayspecs.Duration |
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 | |
// concurrent http request safe check: (PubSub tests) | |
// | |
// depends {HttpRequest, HttpRequestPool} => pecl_http | |
// | |
class MyRequest extends HttpRequest { | |
protected $id; | |
protected $time; |
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
// | |
// js port scala's Tuple2 | |
// | |
var Tuple2 = function(arg1, arg2) { | |
var self = (this == window) ? {} : this; | |
self._1 = arg1; | |
self._2 = arg2; | |
return self; | |
} |
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
var __webkitPointEmulator__ = function (){ | |
window.WebKitPoint = function(x, y){ | |
this.x = x; | |
this.y = y; | |
}; | |
} | |
var __webkitConvertPointFromNodeToPageEmulator__ = function (){ | |
window.webkitConvertPointFromNodeToPage = function(element, pos){ | |
var pos = Element.cumulativeOffset(element); | |
return { |
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
closures := List clone | |
for(i, 1, 5, | |
localvar := "foo" .. i | |
closures append(block(localvar)) | |
) | |
closures foreach(b, b call println) | |
// ==> foo5 | |
// ==> foo5 | |
// ==> foo5 |
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
var closures = List[() => String]() | |
for(i <- (1 to 5)) { | |
val localvar = "foo" + i | |
closures = {() => localvar } :: closures | |
} | |
closures.foreach { f => println(f()) } | |
// ==> foo5 | |
// ==> foo4 | |
// ==> foo3 |
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
LoadModule log_config_module modules/mod_log_config.so | |
LoadModule logio_module modules/mod_logio.so | |
BufferedLogs On | |
#ErrorLog /var/log/httpd/error_log | |
ErrorLog "|logger -p local0.err -t httpd" | |
LogLevel warn |
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
# ... | |
<VirtualHost *:80> | |
: | |
: | |
LogLevel warn | |
ErrorLog "|logger -p local0.err -t httpd" | |
CustomLog "|logger -p local0.info -t httpd" combined | |
: | |
: | |
</VirtualHost> |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | |
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"> | |
<param name="Target" value="System.out" /> | |
<param name="ImmediateFlush" value="true" /> | |
<layout class="org.apache.log4j.PatternLayout"> | |
<param name="ConversionPattern" value="%-5p %d [%t] %c: %m%n" /> | |
</layout> |
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
# syslog-ng configuration file. | |
# | |
# This should behave pretty much like the original syslog on RedHat. But | |
# it could be configured a lot smarter. | |
# | |
# See syslog-ng(8) and syslog-ng.conf(5) for more information. | |
# | |
options { | |
sync (100); |