Skip to content

Instantly share code, notes, and snippets.

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)
@robertoandrade
robertoandrade / switch_magic
Created October 29, 2014 14:28
Decryption algorithm functions with long switch case
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
int v7; // eax@11
@robertoandrade
robertoandrade / README.md
Last active April 24, 2017 04:03
Ravello Public Highly Available Load Balancer Failover Configuration

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 / README.md
Created May 18, 2015 19:12
Maven Output Coloring

Just add to your .bashrc or .bash_profile as:

source ~/bin/mvn-color.sh
@robertoandrade
robertoandrade / parse-erd-bookmarklet.js
Last active August 29, 2015 14:24
Bookmarklet to export an ERD out of a Parse app's schema
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 / wpmail_exceptions.php
Last active August 26, 2015 15:58 — forked from franz-josef-kaiser/wpmail_exceptions.php
WP Mail Error/Exception handling and SMTP settings
<?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 / homestead-pac.js
Created April 27, 2022 13:57
PAC config for returning SOCKS proxy for local network addresses
function FindProxyForURL(url, host) {
// our local URLs from the domains below example.com don't need a proxy:
if (shExpMatch(host, "*.example.com"))
{
return "DIRECT";
}
// URLs within this network are accessed through
// port 8888 on localhost:
if (isInNet(host, "192.168.10.0", "255.255.255.0"))