Skip to content

Instantly share code, notes, and snippets.

View amusarra's full-sized avatar

Antonio Musarra amusarra

View GitHub Profile
@johnkary
johnkary / WSSoapClient.php
Created June 27, 2012 20:08
WS-Security for PHP SoapClient
<?php
/**
* Copyright (c) 2007, Roger Veciana
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
@chicks
chicks / SugarCRM LAMP Stack Tuning
Last active February 8, 2021 13:33
SugarCRM Performance Tweaks
Apache:
- Activated 'KeepAlive' connections
- Lowered keep alive timeout from 15 seconds to 2 seconds
- Increased the number of minimum workers from 8 to 16
- Activated server status page (/server-status)
APC (Alternative PHP Cache):
- Set cache size to 256MB (ideal for SugarCRM workload)
Memcache:
@mpern
mpern / OnRequestScript.groovy
Last active September 21, 2020 22:48
Simulate HTTP Auth for SOAP UI Mock Server
import com.eviware.soapui.support.types.StringToStringsMap
def authSucceeded = false
// Add those custom properties to your mock server
def user = mockRunner.mockService.getPropertyValue("httpUsername")
def pass = mockRunner.mockService.getPropertyValue("httpPassword")
log.info "checking for credentials: $user:$pass"
// get the request headers
StringToStringsMap headers = mockRequest.getRequestHeaders()
@amusarra
amusarra / ExecuteGenericJob.java
Created June 7, 2011 10:12
Classe Java per l’esecuzione di un Job Kettle.
package it.dontesta.lab.jobs.kettle;
import org.pentaho.di.core.KettleEnvironment;
import org.pentaho.di.core.logging.LogChannel;
import org.pentaho.di.core.logging.LogChannelInterface;
import org.pentaho.di.core.plugins.PluginRegistry;
import org.pentaho.di.core.plugins.RepositoryPluginType;
import org.pentaho.di.job.Job;
import org.pentaho.di.job.JobMeta;
import org.pentaho.di.repository.RepositoriesMeta;
@nickrouty
nickrouty / gist:52269b159bd283710830
Last active August 29, 2015 14:02
Install PHP IMAP Extension for OSX Mavericks
#!/bin/bash
BUILDDIR=/tmp/php_imap_mavericks
mkdir "$BUILDDIR"
echo " "
echo "= FETCHING AND INSTALLING IMAP"
echo " "
cd "$BUILDDIR"
wget -c ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz
rm -rf imap-2007f