Skip to content

Instantly share code, notes, and snippets.

@maranemil
maranemil / gist:0adfcd96747629899013
Created April 27, 2015 07:26
Xampp 1.8.2 Ubuntu APC XDEBUG settings php.ini
;[xdebug]
;zend_extension=/usr/lib/php5/20121212/xdebug.so
;zend_extension=/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
;xdebug.auto_trace = 0
;xdebug.default_enable = 1
;xdebug.idekey = "PHPSTORM"
;xdebug.extended_info=1
;xdebug.show_local_vars=1
;xdebug.remote_log=/home/user/xdebug-log.txt
@maranemil
maranemil / gist:5a7547aee3d2ef79d1c4
Last active August 29, 2015 14:20
Tidbit Benchmark Tool Howto
Tidbit 2.0 - data generation tool for the SugarCRM application ( Benchmark Tool )
Tidbit is a tool to create massive amounts of data for a SugarCRM instance.
Source Git:
https://github.com/sugarcrm/Tidbit
Installation:
https://github.com/sugarcrm/Tidbit/blob/master/README
@maranemil
maranemil / gist:f9b9fe1cfa57aa2a683d
Created April 28, 2015 05:08
SkaleTracker FX Settings
mda ThruZero RT.10.23 DP2.52 MX37% FB0%
mda Delay LD340 RD133 FB82% FBT0 FBMIX83% O.0db
Freeverb2 RS 0.79 DP 100% PD172 LP57 HP 81 WL10
mda Stereo W65 D 23.2 B.0 M 2.2 RT 3.16
mda Delay L107 R107 Fb63 FXMIX 60
Freeverb2 Rs 0.94 D 50% Lp 14% Hp 25%
----------------------
mda Delay L339 R133 FB69%
#!/usr/bin/php
<?php
/*
* Copyright 2013
* Jeff Bickart
* @bickart
* jeff @ neposystems.com
*/
@maranemil
maranemil / gist:990ece0d5cd880487d7d
Created April 29, 2015 11:24
Sugar Query Get All Contacts with Email
SELECT IFNULL(contacts.id,'') primaryid ,IFNULL(contacts.last_name,'') contacts_last_name ,IFNULL(contacts.first_name,'') contacts_first_name ,IFNULL(l1.id,'') l1_id ,l1.email_address l1_email_address FROM contacts
LEFT JOIN email_addr_bean_rel l1_1 ON contacts.id=l1_1.bean_id AND l1_1.deleted=0 AND l1_1.primary_address = '1' AND l1_1.bean_module = 'Contacts'
LEFT JOIN email_addresses l1 ON l1.id=l1_1.email_address_id AND l1.deleted=0
WHERE ((((coalesce(LENGTH(contacts.first_name),0) > 0) )
AND ((coalesce(LENGTH(contacts.last_name),0) > 0) )
AND ((coalesce(LENGTH(l1.email_address),0) > 0) )))
AND contacts.deleted=0
@maranemil
maranemil / gist:bc1cff5dbd4a79176c26
Created May 6, 2015 12:35
Get Php Version and Set Memory Limit and Execution Time
ini_set('max_execution_time', 300); //300 seconds = 5 minutes
ini_set('max_execution_time', 0); //0=NOLIMIT
set_time_limit(10); // or this way
ini_set('memory_limit', '256M');
ini_set('memory_limit', '3G'); // 3 Gigabytes
echo '<!-- ';
echo 'Die aktuelle PHP Version ist ' . phpversion();
echo ' -->';
@maranemil
maranemil / gist:34e4a8c3ba6d56022525
Last active August 29, 2015 14:20
Fix for MySQL Socket Error Xampp Lampp phpMyAdmin
// The server is not responding (or the local MySQL server's socket is not correctly configured)
// Change:
$cfg['Servers'][$i]['host'] = 'localhost';
//to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
@maranemil
maranemil / gist:0a7136ae46ad89d99172
Created June 3, 2015 11:38
How To Manipulate Names on Action Drowpdown Sugar7 with Javascript
({
extendsFrom: 'RecordView',
events: {
'click [track="click:actiondropdown"]': "UpdateMyButton"
},
initialize: function (options) {
this._super('initialize', [options]);
},
UpdateMyButton: function () {
@maranemil
maranemil / gist:18836d6559a386a41ee6
Created June 12, 2015 10:29
SugarCRM7 Add custom action button and custom view with drawer
Step 1. Create Custom Layout in:
custom/modules/<YourModule>/clients/base/layouts/<YourLayout>/<YourLayout>.php
Define YourLayout
and define $viewdefs['YourModule']['base']['layout']['YourLayout'] ....
...
'components' =>
array(
array(
'view' => 'YourView',
<?php
/**
* @author Emil Kilhage <[email protected]>
*/
$app_list_strings['iso_3166_1_country_code_list'] = array (
"SE" => "Sweden",
"FI" => "Finland",
"NO" => "Norway",
"DK" => "Denmark",