Wapijure Command is the script to generate a Compojure project to build a Web API.
$ wget https://raw.github.com/gist/2870539/wapijure
$ chmod +x wapijure
$ ./wapijure new awesomeapi
$ cd awesomeapi
kill `ps aux | grep xsp4.exe | grep -v grep | awk '{print $2}'` |
.DS_Store | |
*.dll | |
*.exe |
using System; | |
using System.Collections.Generic; | |
namespace TaskParallelization | |
{ | |
class ErrorLogger | |
{ | |
private readonly IList<string> _messages; | |
public ErrorLogger() |
.DS_Store | |
*.dll | |
*.xml |
.DS_Store | |
*.exe |
# ========================== | |
# Getting Started with klogd | |
# ========================== | |
# | |
# Klogd is a dumb script to stream Syslog messages to a Kafka server. | |
# | |
# 1) Make sure you have all dependencies installed properly | |
# | |
# - Twisted | |
# - PyParsing |
$ python xlog.py sample.log | |
{'appname': 'test.app', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '68898', 'priority': '132', 'message': 'bla bla bla warn'} | |
{'appname': 'test.app', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '68902', 'priority': '131', 'message': 'bla bla bla error'} | |
{'appname': 'Dock', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '154', 'priority': '11', 'message': 'CGSReleaseWindowList: called with 5 invalid window(s)'} | |
{'appname': 'WindowServer', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '79', 'priority': '11', 'message': 'CGXSetWindowListAlpha: Invalid window 0'} | |
$ python xlog.py sample.log | grep test.app | |
{'priority': '132', 'timestamp': '2020-03-04 12:42:40', 'hostname': 'codezone.local', 'appname': 'test.app', 'pid': '68898', 'message': 'bla bla bla warn'} |
$ psql -h 127.0.0.1 -d postgres | |
postgres=# CREATE USER fulano SUPERUSER; | |
postgres=# CREATE DATABASE fulano_development OWNER fulano; | |
postgres=# CREATE DATABASE fulano_test OWNER fulano; | |
postgres=# \q |
package msgpack.rpc.sample.client; | |
import org.msgpack.rpc.Client; | |
import org.msgpack.rpc.loop.EventLoop; | |
public class ClientApp { | |
private static class SpawnRequest { | |
private SpawnRequest(final int clientCount, final int requestCount, final RPCInterface iface) { | |
new Thread(new Runnable() { | |
public void run() { |