Skip to content

Instantly share code, notes, and snippets.

View andrewvmail's full-sized avatar

momoterraw andrewvmail

View GitHub Profile
-spec process_groupchat_message(ejabberd:simple_jid() | ejabberd:jid(),
jlib:xmlel(), state()) -> fsm_return().
process_groupchat_message(From, #xmlel{name = <<"message">>,
attrs = Attrs} = Packet,
StateData) ->
% ?INFO_MSG("================ MOMOTERRAW ====================>", []),
Lang = xml:get_attr_s(<<"xml:lang">>, Attrs),
case can_send_to_conference(From, StateData) of
{xmlel,<<"message">>,[{<<"type">>,<<"groupchat">>},{<<"id">>,<<"purple48c596e7">>},{<<"to">>,<<"momoterraw@muc.localhost">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"Test">>}]}]}
{xmlel,<<"message">>,[{<<"type">>,<<"groupchat">>},{<<"id">>,<<"purple48c596e7">>},{<<"to">>,<<"momoterraw@muc.localhost">>}],[{xmlel,<<"body">>,[],[{xmlcdata,<<"Test">>}]}]}
export class HomePage extends React.Component {
constructor(props) {
super(props);
this.handleChanged = () => {
console.log('hello world');
}
console.log('=-==>', this.handleChanged);
}
@andrewvmail
andrewvmail / momo-atom-config
Created October 18, 2016 07:39
momo-atom-config
.
@andrewvmail
andrewvmail / fail2ban exercises
Created November 28, 2016 20:31
fail2ban exercises
fail2ban-regex /var/log/apache2/other_vhosts_access.log '^.* <HOST> - - .*/xmlrpc\.php.*$'
^.* <HOST> - - .*/xmlrpc\.php.*$
/var/log/apache2/other_vhosts_access.log
@andrewvmail
andrewvmail / 01-ubuntu-16.04-setup.md
Created April 2, 2017 21:48 — forked from tomysmile/01-ubuntu-16.04-setup.md
Ubuntu 16.04 Setup in Digital Ocean

Initial Server Setup with Ubuntu 16.04

Update Packages

$ sudo apt-get update

Add Swap

@andrewvmail
andrewvmail / android_instructions.md
Created April 30, 2017 23:29 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

// This is in the constructor of a class
this.onInvite = session => {
console.log(this);
console.log(this);
console.log(this);
console.log(this);
console.log(this);
console.log(this);
// reject this call if we already have an existing call
if (this._session) {
@andrewvmail
andrewvmail / 00_OSX_Docker_Machine_Setup.md
Created March 28, 2018 16:19 — forked from bitjockey42/00_OSX_Docker_Machine_Setup.md
Use native virtualization on OS X docker with xhyve

What this?

So one of the painful points of using docker on OS X is that you need to run a virtualbox VM, which often suffers from performance issues. With xhyve, a OS X virtualization system, and docker-machine-xhyve you can now have docker use the native OS X hypervisor to run containers.

No more dealing with virtualbox shenanigans!

In this script, I've also set up a way to autoconfigure terminal sessions to load docker's environment vars (dependent on docker-machine) so you do not have to run eval $(docker-machine env whatever) every time you open a new terminal window.

Requirements