Skip to content

Instantly share code, notes, and snippets.

View matthewpoer's full-sized avatar

Matthew Poer matthewpoer

View GitHub Profile
@tdlm
tdlm / how-i-work.md
Last active May 19, 2023 02:13
How I Work

When I Work

I am in the Pacific time zone (UTC -8/-7). Typically, I work from 9:00am - 6pm after waking up at about 5:30am, hopefully with a brief walk around the block, and getting the kids started with their day. I try to take a lunch anywhere between 11:30am and 2pm. Sometimes I'll step away for a short sanity break. Other than that, I'm usually at my desk. At the very least, I have my phone with me.

All that being said, I try my best to stay mindful, wherever I am. When I'm at work, my priority is work. When I'm with family, however, work becomes a close second.

Where I Work

I work from my home office in Anaheim Hills, California.

@patpawlowski
patpawlowski / sugarbackupdownload.php
Last active June 30, 2017 03:54
PHP Script to download Sugar backups from the pbs_Backups module
<?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
<?php
//-----------------------------------------------------------------------------
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/entryPoint.php');
//-----------------------------------------------------------------------------
$db = DBManagerFactory::getInstance();
//-- TEMPLATE = birgit
$query = "SELECT id from users where user_name='birgit'";
$result = $db->query($query, true,"Error fetching birgit: ");
@groggu
groggu / nsCountryCpdes.php
Created October 12, 2015 20:06
Convert standard ISO country codes to NetSuite's constants
/***
* Convert standard ISO country codes to NetSuite's world
*
* @param $isoCode
*
* @return string|bool
*/
public function convertCountryCode($isoCode)
{
@aminsol
aminsol / Netsuite Country List PHP Array
Created April 29, 2015 04:47
Netsuite Country List PHP Array
$countries = array(
"AF" => "_afghanistan",
"AX" => "_alandIslands",
"AL" => "_albania",
"DZ" => "_algeria",
"AS" => "_americanSamoa",
"AD" => "_andorra",
"AO" => "_angola",
"AI" => "_anguilla",
"AQ" => "_antarctica",
@elchele
elchele / flex-list.hbs
Last active August 29, 2015 14:06
Expanding the default width on the Name column
{{!--
/*
* Your installation or use of this SugarCRM file is subject to the applicable
* terms available at
* http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/.
* If you do not agree to all of the applicable terms or do not have the
* authority to bind the entity as an authorized representative, then do not
* install or use this SugarCRM file.
*
* Copyright (C) SugarCRM Inc. All rights reserved.
@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;
@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:
@chicks
chicks / 1_Install_Tidbit.sh
Last active May 21, 2018 12:46
Load Testing Sugar Cheat Sheet
# Download from here: https://github.com/sugarcrm/Tidbit
# Copy Tidbit to your Sugar Root and unpack
cp Tidbit-master.zip /var/www/html
unzip Tidbit-master.zip
# Run Tidbit
cd Tidbit
php -f install_cli.php -- -c
@jmertic
jmertic / gist:5730287
Last active November 14, 2017 13:22
Sample PHP script for connecting to the new RESTful SugarCRM REST API in 6.7 and later.
<?php
// specify the REST web service to interact with
$baseurl = '<<instanceurl>>/rest/v10';
/**
* Authenicate and get back token
*/
$curl = curl_init($baseurl . "/oauth2/token");
curl_setopt($curl, CURLOPT_POST, true);