Skip to content

Instantly share code, notes, and snippets.

@dirkmoors
dirkmoors / procedure
Last active June 22, 2016 19:29
ejabberd 13.12 Build from source + Ubuntu 14.04LTS installation
• Node 1, 2, … X
○ sudo su -l
○ cd
○ apt-get update
○ apt-get upgrade
○ apt-get install git-core
○ apt-get install libyaml-dev
○ apt-get install erlang
○ apt-get install unzip
○ apt-get build-dep ejabberd
@dirkmoors
dirkmoors / XMPPTest.java
Created April 3, 2014 09:05
Smack: Simple MUC test
package messaging;
import java.io.IOException;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
@dirkmoors
dirkmoors / XMPPService.java
Last active August 29, 2015 13:58
Smack: Simple wrapper to obtain XMPPConnection based on JID and password
package freely.messaging;
import java.io.IOException;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.TCPConnection;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode;
import org.jivesoftware.smack.XMPPException;
@dirkmoors
dirkmoors / gist:9812522
Last active September 26, 2023 20:39
Python AES with HMAC test
#!/usr/bin/env python
"""
Roughly based on: http://code.activestate.com/recipes/576980-authenticated-encryption-with-pycrypto/
"""
import hashlib
import hmac
from Crypto.Cipher import AES
from Crypto.Random import random