Skip to content

Instantly share code, notes, and snippets.

View lloydwatkin's full-sized avatar

Lloyd Watkin lloydwatkin

View GitHub Profile
lloyd@zenbook:~/Dropbox/code/xmpp-ftw$ jitsu deploy
info: Welcome to Nodejitsu lloydwatkin
info: jitsu v0.12.8, node v0.8.19
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node examples/index.js
info: Creating snapshot 0.3.1
info Uploading: [=============================] 100%
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
@lloydwatkin
lloydwatkin / gist:5233926
Created March 24, 2013 22:45
Nodejitsu deploy issue
lloyd@zenbook:~/Dropbox/code/xmpp-ftw$ jitsu deploy
info: Welcome to Nodejitsu lloydwatkin
info: jitsu v0.12.0, node v0.8.19
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node examples/index.js
info: Creating snapshot 0.3.0
info Uploading: [=============================] 100%
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
@lloydwatkin
lloydwatkin / init.properties
Created February 5, 2013 17:00
Tigase for buddycloud
--cluster-mode = false
config-type = --gen-config-all
--cluster-nodes = ip-10-66-2-93
--debug=server,xmpp.impl,db
--user-db = derby
--admins = admin@ip-10-66-2-93
--user-db-uri = jdbc:derby:/opt/tigase/tigasedb
--virt-hosts=ip-10-66-2-93,localhost
--comp-name-1=ext
--comp-class-1 = tigase.server.ext.ComponentProtocol
ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
DRV="-Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver:org.apache.derby.jdbc.EmbeddedDriver"
#GC="-XX:+UseBiasedLocking -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:ParallelCMSThreads=2"
JAVA_HOME="/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64"
CLASSPATH=""
#JAVA_OPTIONS="${GC} ${ENC} ${DRV} -server -Xms100M -Xmx200M -XX:PermSize=32m -XX:MaxPermSize=256m -XX:MaxDirectMemorySize=128m "
JAVA_OPTIONS="${GC} ${ENC} ${DRV} -server -Xms200M -Xmx400M -XX:PermSize=64m -XX:MaxPermSize=512m -XX:MaxDirectMemorySize=256m "
TIGASE_CONFIG="etc/tigase.xml"
TIGASE_OPTIONS=" --property-file etc/init.properties"
@lloydwatkin
lloydwatkin / gist:4556860
Created January 17, 2013 15:42
Hack to backbone.js to get buddycloud webclient + http api server + tigase (+ buddycloud java server) talking.
@@ -1418,9 +1419,18 @@
// Make the request, allowing the user to override any Ajax options.
return Backbone.ajax(_.extend(params, options));
};
-
+var credentials;
// Set the default implementation of `Backbone.ajax` to proxy through to `$`.
Backbone.ajax = function() {
+ if (arguments[0].credentials) {
+ console.log("Storing credentials", arguments[0].credentials);
2013-01-15 10:46:39 TigaseCustomAuth.saslAuth() FINEST: response: username="admin",realm="ip-10-66-2-93",nonce="zwhJnNYdNl4NAgiMf5YLzW6ZsXSV1+4yuOU3J3cz",cnonce="12691854",nc="00000001",qop="auth",digest-uri="xmpp/ip-10-66-2-93",response="61aca98e188c2ae11872703718995924",charset="utf-8",authzid="romeo"
2013-01-15 10:46:39 TigaseCustomAuth$SaslCallbackHandler.handle() FINEST: Callback: RealmCallback
2013-01-15 10:46:39 TigaseCustomAuth$SaslCallbackHandler.handle() FINEST: RealmCallback: ip-10-66-2-93
2013-01-15 10:46:39 TigaseCustomAuth$SaslCallbackHandler.handle() FINEST: Callback: NameCallback
2013-01-15 10:46:39 TigaseCustomAuth$SaslCallbackHandler.handle() FINEST: NameCallback: admin
2013-01-15 10:46:39 TigaseCustomAuth$SaslCallbackHandler.handle() FINEST: Callback: PasswordCallback
2013-01-15 10:46:39 TigaseCustomAuth$SaslCallbackHandler.handle() FINEST: PasswordCallback: admin
2013-01-15 10:46:39 TigaseCustomAuth$SaslCallbackHandler.handle() FINEST: Callback: AuthorizeCallback
2
@lloydwatkin
lloydwatkin / gist:4534099
Created January 14, 2013 22:25
Nodejitsu deploy errors
prompt: Is this ok?: (yes)
info: Creating snapshot 0.1.0-41
info Uploading: [=============================] 100%
info: Updating app pinitto.me
info: Activating snapshot 0.1.0-41 for pinitto.me
info: Starting app pinitto.me
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: There was an error while attempting to deploy the app
error:
@lloydwatkin
lloydwatkin / gist:4511367
Created January 11, 2013 15:11
Nodejitsu error for site http://pinittome.jit.su
An error has occurred: {"bytesParsed":0,"code":"HPE_INVALID_CONSTANT"}
@lloydwatkin
lloydwatkin / gist:4502273
Created January 10, 2013 14:12
Clean yammer unread messages
var loadAndClose = function(url) {
var thisUrl = url;
console.log('Opening ' + thisUrl);
var newTab = window.open(thisUrl, '_blank');
setTimeout(function() { newTab.close(); console.log('Closing ' + thisUrl); } , 4000);
};
var process = function(elements, index) {
if (index >= elements.length) return;
var url = document.location.href.substring(0, document.location.href.length-5) + 'show?threadId='+elements[index].getAttribute('data-thread-id');
OUTGOING: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5"></auth>
INCOMING: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl" xmlns:stream="http://etherx.jabber.org/streams">cmVhbG09ImlwLTEwLTY2LTItOTMiLG5vbmNlPSJtSU1tVkJxZWhRZzFQZlBhWVBhaG00N3lKQXRNck9tNFNNVnpvL3hjIixxb3A9ImF1dGgiLGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz</challenge>
OUTGOING: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9InJvbWVvIixyZWFsbT0iaXAtMTAtNjYtMi05MyIsbm9uY2U9Im1JTW1WQnFlaFFnMVBmUGFZUGFobTQ3eUpBdE1yT200U01Wem8veGMiLGNub25jZT0iNzg4MTQ1NTEiLG5jPSIwMDAwMDAwMSIscW9wPSJhdXRoIixkaWdlc3QtdXJpPSJ4bXBwL2lwLTEwLTY2LTItOTMiLHJlc3BvbnNlPSJjOGMwMWM2ZmVhMWQxNGE4YTg4YjkxZThlOGM3NGFkMCIsYXV0aHppZD0icm9tZW9AaXAtMTAtNjYtMi05MyIsY2hhcnNldD0idXRmLTgi</response>
INCOMING: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl" xmlns:stream="http://etherx.jabber.org/streams"><not-authorized/></failure>
Authentication fail: XMPP authentication failure