Skip to content

Instantly share code, notes, and snippets.

@amichaelgrant
amichaelgrant / gist:4761593
Created February 12, 2013 11:03
Error logs after replacing tomcat-jdbc jar with a newer version
Feb 12, 2013 10:56:47 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-28080"]
Feb 12, 2013 10:56:47 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-28443"]
Feb 12, 2013 10:56:47 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1121 ms
Feb 12, 2013 10:56:47 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 12, 2013 10:56:47 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.21
@amichaelgrant
amichaelgrant / gist:4770504
Created February 12, 2013 15:09
After login
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
@amichaelgrant
amichaelgrant / gist:4943473
Created February 13, 2013 09:56
Server.xml
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@amichaelgrant
amichaelgrant / gist:4952482
Created February 14, 2013 12:34
How to setup mifosx backend on tomcat7 on ubuntu 11.10 with mysql
How to setup mifosx backend on tomcat7 on ubuntu 11.10 with mysql
http://the-things-i-collect.blogspot.com/2013/02/how-to-setup-mifosx-on-tomcat7-on.html
function convertMS(ms) {
var d, h, m, s;
s = Math.floor(ms / 1000);
m = Math.floor(s / 60);
s = s % 60;
h = Math.floor(m / 60);
m = m % 60;
d = Math.floor(h / 24);
h = h % 24;
return { d: d, h: h, m: m, s: s };
(function() {
function DateDiff(date1, date2) {
this.days = null;
this.hours = null;
this.minutes = null;
this.seconds = null;
this.date1 = date1;
this.date2 = date2;
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;
# How to echobot with XMPP, BOSH, and Strophe
1. Setup ejabberd(http://www.ejabberd.im/) server and setup account [email protected]
NOTE: localhost should be enough. If you setup something else, make sure you add it at /etc/hosts like this
#/etc/hosts
127.0.0.1 localhost.local
NOTE: Also download Psi(http://psi-im.org/), and make sure you can connect to your ejabberd server.
2. Download strophe(http://code.stanziq.com/strophe/) and place it (eg: /Users/makoto/work/sample/strophejs-1.0)
@amichaelgrant
amichaelgrant / gist:5023846
Created February 24, 2013 13:29
Nginx+Tcp+proxy
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;
webserver: webserver.c libuv/uv.a http-parser/http_parser.o
gcc -I libuv/include \
-lrt -lm -lpthread -o \
webserver webserver.c \
libuv/uv.a http-parser/http_parser.o
libuv/uv.a:
$(MAKE) -C libuv
http-parser/http_parser.o: