Skip to content

Instantly share code, notes, and snippets.

Roberto Andrade robertoandrade

Block or report user

Report or block robertoandrade

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@robertoandrade
robertoandrade / wpmail_exceptions.php
Last active Aug 26, 2015 — forked from franz-josef-kaiser/wpmail_exceptions.php
WP Mail Error/Exception handling and SMTP settings
View wpmail_exceptions.php
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Plugin Name: (WCM) PHPMailer Exceptions & SMTP
* Description: WordPress by default returns <code>FALSE</code> instead of an <code>Exception</code>. This plugin fixes that.
*/
add_action( 'phpmailer_init', 'WCMphpmailerException' );
function WCMphpmailerException( $phpmailer )
{
@robertoandrade
robertoandrade / parse-erd-bookmarklet.js
Last active Aug 29, 2015
Bookmarklet to export an ERD out of a Parse app's schema
View parse-erd-bookmarklet.js
if (!window.app || !window.schemas) {
alert('It doesn\'t seem like you\'re logged in to the Parse Core Data Dashboard. Make sure to login first and then click this bookmarklet.');
} else {
var $form =
$(
'<form method="post" action="http://erd-web-server.herokuapp.com/">' +
'<textarea name="erdText"></textarea>' +
'</form>'
);
@robertoandrade
robertoandrade / README.md
Created May 18, 2015
Maven Output Coloring
View README.md

Just add to your .bashrc or .bash_profile as:

source ~/bin/mvn-color.sh
@robertoandrade
robertoandrade / README.md
Last active Apr 24, 2017
Ravello Public Highly Available Load Balancer Failover Configuration
View README.md

Preface

This gist provides a way to automatically move an associated Elastic IP between nodes of a cluster in case of failover. This is because the standard VIP infrastructure provided by VRRP is not necessarily transparently compatible with Ravello's public IP/NAT routing, so the private VIP is not routable.

Setup

  1. As explained in Ravello's Blog, configure a couple of Highly Available Load Balancers using Keepalived (check this blog article if in doubt).
  2. Make sure to enable cloud-init on the VM and configure your VM to export the environment variables described below according to your setup.
@robertoandrade
robertoandrade / switch_magic
Created Oct 29, 2014
Decryption algorithm functions with long switch case
View switch_magic
This file has been truncated, but you can view the full file.
int ____________________switch_magic()
{
int v0; // esi@1
int v1; // edi@2
int v2; // eax@3
int v3; // eax@7
int v4; // eax@7
int v5; // ebx@10
int v6; // eax@10
View maven wagon-webdav-jackrabbit commons-logging missing error
com.google.inject.ProvisionException: Guice provision errors:
1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.maven.wagon.providers.webdav.WebDavWagon.<init>(Unknown Source)
while locating org.apache.maven.wagon.providers.webdav.WebDavWagon
1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1006)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
You can’t perform that action at this time.