Skip to content

Instantly share code, notes, and snippets.

View amusarra's full-sized avatar

Antonio Musarra amusarra

View GitHub Profile
@amusarra
amusarra / Launcher
Created January 13, 2015 12:51
Add JAVA_HOME on Launcher of Kindle Previewer OS X Yosemite
#!/bin/sh
dir=`dirname "$0"`
cd "$dir"
classpath=./:./lib/touchLibs/etc/fonts/fonts
for i in `ls ./lib`
do
classpath=$classpath:./lib/$i
done
@amusarra
amusarra / liferaycatalina
Created January 12, 2015 10:27
Log rotate catalina.out
/home/liferay/portale/tomcat-7.0.32/logs/catalina.out {
copytruncate
daily
rotate 5
compress
missingok
size 200M
}
@amusarra
amusarra / HasUserRoleNameExpression.php
Last active May 1, 2019 04:50
SugarCRM 7: How to make certain fields readonly
<?php
/**
* Project: SugarCRM Logic Expression for checking User role
* Original Dev: Antonio Musarra, January 2014
* @2009-2014 Antonio Musarra <antonio.musarra[at]gmail.com>
*
* Desc: SugarCRM Logic Expression ext class
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@amusarra
amusarra / AUIAutoCompleteViaAjax.js
Created September 29, 2014 16:12
AUI Auto Complete by Ajax via POST
var dataSource = new A.DataSource.IO(
{
source: '<%=getAccountResourceURL%>',
ioConfig: {
method: 'post',
}
}
);
var autoComplete = new A.AutoComplete(
<?php
/**
* This class can add WSSecurity authentication support to SOAP clients
* implemented with the PHP 5 SOAP extension.
*
* It extends the PHP 5 SOAP client support to add the necessary XML tags to
* the SOAP client requests in order to authenticate on behalf of a given
* user with a given password.
*
@amusarra
amusarra / sugarcrm7dev-env000_v1.1.0
Created September 16, 2014 21:27
VM Info - SugarCRM 7 Development Environment
Name: SugarCRM 7 Development Environment
Groups: /Server Linux - CRM
Guest OS: Red Hat (64 bit)
UUID: 079d17c4-a1e7-46b1-b50c-3fa5497c66d1
Config file: /Users/amusarra/Library/VirtualBox/Machines/Server Linux - CRM/SugarCRM 7 Development Environment/SugarCRM 7 Development Environment.vbox
Snapshot folder: /Users/amusarra/Library/VirtualBox/Machines/Server Linux - CRM/SugarCRM 7 Development Environment/Snapshots
Log folder: /Users/amusarra/Library/VirtualBox/Machines/Server Linux - CRM/SugarCRM 7 Development Environment/Logs
Hardware UUID: 079d17c4-a1e7-46b1-b50c-3fa5497c66d1
Memory size: 4096MB
Page Fusion: off
@amusarra
amusarra / check_informix.sh
Created August 28, 2014 17:26
Check Informix (nagios-plugins 1.4)
#!/bin/bash
##
# Set Required evironment variable for IDS Informix 10
# Add. 12/06/2008 Antonio Musarra <antonio.musarra@romcad.it>
##
INFORMIXDIR=/opt/IBM/informix
PATH=$PATH:$INFORMIXDIR/bin
ONCONFIG=onconfig.cormonet
INFORMIXSERVER=cormonet
@amusarra
amusarra / page.jsp
Last active August 29, 2015 14:01
liferay-ui input-date
<%--
/**
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of the Liferay Enterprise
* Subscription License ("License"). You may not use this file except in
* compliance with the License. You can obtain a copy of the License by
* contacting Liferay, Inc. See the License for the specific language governing
* permissions and limitations under the License, including but not limited to
* distribution rights of the Software.
@amusarra
amusarra / GetUpcomingActivities.json
Last active April 26, 2016 12:47
A SugarCRM REST API Application
[
{
"id": "e865ab32-d695-9aca-226d-534331a99563",
"module": "Calls",
"date_due": "2014-04-16 23:15:00",
"summary": "Call for Spring Integration"
},
{
"id": "906a0565-01ab-4681-1562-534336998344",
"module": "Opportunities",
@amusarra
amusarra / SugarCRMLoginRestAPI.html
Created April 7, 2014 12:05
SugarCRM REST API - Authentication via JQuery
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SugarCRM Login via REST API</title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
</head>
<body>