Skip to content

Instantly share code, notes, and snippets.

View amusarra's full-sized avatar

Antonio Musarra amusarra

View GitHub Profile
@amusarra
amusarra / SugarCRMProxyFilteredByNetLB.xml
Last active December 22, 2015 14:48
Configuration WSO2 ESB SugarCRM Balanced Proxy Service
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="SugarCRMProxyFilteredByNetLB"
transports="https,http"
statistics="enable"
trace="enable"
startOnLoad="true">
<target faultSequence="errorHandler">
<inSequence>
<property name="client-host" expression="get-property('axis2', 'REMOTE_HOST')"/>
@amusarra
amusarra / SugarCRMProxyFilteredByNetLB_Fault.xml
Created September 8, 2013 21:16
Proxy Service SugarCRMProxyFilteredByNetLB SOAP Fault
<soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode xmlns:tns="http://www.w3.org/2003/05/soap-envelope">tns:Receiver</faultcode>
<faultstring>403.6 - IP address rejected. Status code in response to a request from a client for a web page or resource to indicate that the server can be reached and understood the request, but refuses to take any further action. </faultstring>
</soapenv:Fault>
SubscriptionSender subscriptionSender = new SubscriptionSender();
subscriptionSender.setSubject("Lista degli utenti disattivati");
subscriptionSender.setBody(emailBody.toString());
subscriptionSender.setUserId(user.getUserId());
subscriptionSender.setCompanyId(user.getCompanyId());
subscriptionSender.setFrom("noreply@liferay.com", "Liferay Portal");
subscriptionSender.setHtmlFormat(false);
subscriptionSender.setMailId("user", user.getUserId());
@amusarra
amusarra / SortableMultiFull.html
Created November 25, 2013 15:59
Example: Multiple Lists - Full Join - YUI Library
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example: Multiple Lists - Full Join - YUI Library</title>
<meta name="viewport" content="width=960" id="meta-viewport">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic">
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.0/build/cssgrids/cssgrids-min.css">
@amusarra
amusarra / detailviewdefs.php
Last active January 4, 2016 04:48
Populate a custom contact field from the account value
<?php
$viewdefs ['Contacts'] =
array (
'DetailView' =>
array (
'templateMeta' =>
array (
'form' =>
array (
'buttons' =>
@amusarra
amusarra / EMAIL_HTML5_VIDEO.html
Created January 29, 2014 23:08
Simple test for video support in email using HTML5
<!DOCTYPE html><html>
<head>
<meta charset="UTF-8" />
<title>Video For Everybody Test Page</title>
<style type="text/css">
body {width: 640px; margin: 0 auto 20px;
font: 11px "Helvetica Neue", Arial, sans-serif; color: #3b3d3c;}
</style>
</head>
<body>
@amusarra
amusarra / HTTPSClientExampleAllOK.log
Last active August 29, 2015 13:56
HTTPS Client Example
2014-02-12 23:53:10,637 [main] INFO it.dontesta.blog.ssl.HTTPSClientExample - Try to connect to the URL https://www.goodreads.com/book/show/18734728-enterprise-integration-with-wso2-esb?from_search=true ...
2014-02-12 23:53:13,221 [main] INFO it.dontesta.blog.ssl.HTTPSClientExample - HTTP Response Code 200
2014-02-12 23:53:13,221 [main] INFO it.dontesta.blog.ssl.HTTPSClientExample - HTTP Response Message OK
2014-02-12 23:53:13,221 [main] INFO it.dontesta.blog.ssl.HTTPSClientExample - HTTP Content Length -1
2014-02-12 23:53:13,221 [main] INFO it.dontesta.blog.ssl.HTTPSClientExample - HTTP Content Type text/html; charset=utf-8
2014-02-12 23:53:13,221 [main] INFO it.dontesta.blog.ssl.HTTPSClientExample - HTTP Cipher Suite TLS_RSA_WITH_AES_256_CBC_SHA
2014-02-12 23:53:13,221 [main] INFO it.dontesta.blog.ssl.HTTPSClientExample - Certificate Type X.509
2014-02-12 23:53:13,222 [main] INFO it.dontesta.blog.ssl.HTTPSClientExample - Certificate Subject DN CN=*.goodreads.com, O=Goodreads, L=San Francisco, ST=Cal
@amusarra
amusarra / .htaccess
Last active August 29, 2015 13:56
SugarCRM 7.1 - Web Server Configuration
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# Replace <basepath> with the relative web root path to your instance
RewriteBase /<basepath>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^rest/(.*)$ api/rest.php?__sugar_url=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
@amusarra
amusarra / sugarcrm-dev-7-1.conf
Created March 9, 2014 21:33
SugarCRM 7.1 NGINX Config File
server {
listen 8090;
server_name sugarcrmdev-71.dontesta.local;
#charset koi8-r;
access_log /var/log/nginx/sugarcrmdev-71.dontesta.local.access.log main;
error_log /var/log/nginx/sugarcrmdev-71.dontesta.local.error.log;
root /home/sugarcrm/application;
index index.php index.html;
@amusarra
amusarra / SizeOfTheLiferayDocumentLibrary.sql
Created March 18, 2014 09:55
Size of the Liferay Document Library
SELECT DLFILEENTRY.REPOSITORYID,
(SUM(DLFILEENTRY.SIZE_) / 1048576) SIZE_MBYTE
FROM DLFILEENTRY
GROUP BY DLFILEENTRY.REPOSITORYID
ORDER BY SIZE_MBYTE;