This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env php | |
<?php | |
if(!isset($argv[1])){ | |
die("Usage: php getdbbackup.php <path to config.php file>\nExample: php getdbbackup.php ../config.php"); | |
} | |
require $argv[1]; | |
print_r($sugar_config['dbconfig']); | |
$db_host_name = $sugar_config['dbconfig']['db_host_name']; | |
$db_user_name = $sugar_config['dbconfig']['db_user_name']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by NetBeans. | |
* User: patpawlowski | |
* Date: Dec 30, 2016 at 4:19:08 PM | |
* File: SugarPackager.php | |
* find custom/ -type f | |
* Curl: curl https://gitlab.w-systems.com/snippets/11/raw > SugarPackager.php | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by NetBeans. | |
* User: patpawlowski | |
* Date: Jul 14, 2017 at 10:09:28 AM | |
* File: sugar_create_field_list.php | |
* Directions: just execute the file in the root of a Sugar CRM instance. | |
* Tested on Sugar 7.8; I doubt it will work on 6.x. | |
* Execute: php sugar_create_field_list.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by NetBeans. | |
* User: patpawlowski | |
* Date: Mar 3, 2017 at 3:25:54 PM <- My 51st birthday ;) -pat | |
* File: sugarbackupdownload.php | |
* Create: curl https://gist.github.com/patpawlowski/486ea6d6b84bb6b7e90c5474ae5f001c/raw/ce08c191c8b3656d8749ef15c446b706a786b02b/sugarbackupdownload.php > sugarbackupdownload | |
* Make Executable: chmod +xxx sugarbackupdownload | |
* Run: php sugarbackupdownload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by NetBeans. | |
* User: patpawlowski | |
* Date: Dec 20, 2014 at 9:44:51 AM | |
* File: SugarAPI | |
*/ | |
class SugarAPI{ | |
private $oauthtoken = FALSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Written by: Patrick Pawlowski | |
Company: Ticomix | |
Created On: 2016.06.10 | |
Requires: https://gist.github.com/patpawlowski/eac1482fb346175c726fc41821cd9e1e#file-goldmine-contacts-view-sql | |
*/ | |
Select ac.CONTACT, ea.CONTSUPREF + isnull(ea.ADDRESS1, '') EmailAddress | |
from CONTSUPP ac | |
left join CONTSUPP ea on ac.recid = ea.LINKACCT and ea.RECTYPE = 'P' and ea.CONTACT = 'E-mail Address' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Written by: Patrick Pawlowski | |
Company: Ticomix | |
Created On: 2012.04.20 | |
*/ | |
IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Contacts]')) | |
DROP VIEW [dbo].[Contacts] | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Written by: patpawlowski | |
Created On: Oct 26, 2015 at 4:51:52 PM | |
Description: This is a rough attempt to create a funciton to strip the markup from | |
the Act TBL_NOTE.NOTETEXT field. It appears to work for what I need | |
but could probably use some work with the escaped characters. | |
It's not particularly fast but it is faster than other solutions I've come | |
across. It takes about 4 seconds to parse 2700 records. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Be sure to set the timezone in the calling script | |
* date_default_timezone_set('America/Chicago'); | |
* | |
* require_once('ProgressTracker.class.php'); | |
* | |
* | |
*/ | |
class progressTracker{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ((( CONTACT2 Data Integrity Checks ))) | |
/* --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | |
CONTACT2 Integrity Check | |
ALL of the following queries should return NO results. If ANY results are returned, then something is wrong. | |
If the first query returns results, here are your options: | |