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
# Use the HTTP Connection and SugarCRM API to load the Admin user | |
SugarCRM.connection.get_entry("Users", 1) | |
# Retrieve all Accounts by user name (direct API method) | |
SugarCRM.connection.get_entry_list( | |
"Users", | |
"users.user_name = \'sarah\'", | |
{ | |
:link_fields => [ | |
{ |
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 ruby | |
require 'rubygems' | |
require 'sugarcrm' | |
SugarCRM.connect("http://localhost/sugarcrm", 'user', 'password') | |
SugarCRM::Account.find_by_name("JAB Funds Ltd.").contacts.each do |contact| | |
contact.email_addresses.each do |email| | |
puts "#{email.email_address}" unless email.opt_out == "1" | |
end |
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
require 'net/ssh' | |
module AccountAdapters | |
class AdapterHelper | |
def self.ssh_version(system) | |
result = false | |
begin | |
sshSocket = TCPSocket::new(system.ip_address, 22) |
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 | |
$sugar_config_si = array( | |
'setup_db_host_name' => 'localhost', | |
'setup_db_sugarsales_user' => 'sugarcrm', | |
'setup_db_sugarsales_password' => 'DB_USER_PASSWORD', | |
'setup_db_database_name' => 'sugarcrm', | |
'setup_db_type' => 'mysql', | |
'setup_db_pop_demo_data' => 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
SUGAR.util.doWhen('$("#cognos").length > 0', function () { | |
$.ajax({ | |
url:"blah.php", | |
success:function (data) { | |
$("#cognos").html(data) | |
} | |
}) | |
}); |
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
{ | |
"user_auth": { | |
"user_name": "admin", | |
"password": "0d107d09f5bbe40cade3de5c71e9e9b7", | |
"version": 4 | |
}, | |
"application": "sugarcrm_java" | |
} |
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
/////////////////////////////////////////////////////////////////////// | |
//// FOLDERS & TreeView | |
$this->smarty->assign('groupUserOptions', $ie->getGroupsWithSelectOptions(array('' => $app_strings['LBL_EMAIL_CREATE_NEW']))); | |
$tree = $this->getMailboxNodes(); | |
// preloaded folder | |
$preloadFolder = 'lazyLoadFolder = '; | |
$focusFolderSerial = $current_user->getPreference('focusFolder', 'Emails'); | |
if(!empty($focusFolderSerial)) { |
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
#! /bin/bash | |
pkg=../pkg/sugarshell-SLES-6.2.1.tar.gz | |
host=$1 | |
key=../files/ibmcloud_imagebuilder_rsa | |
user=idcuser | |
ssh="ssh -i $key $user@$host" | |
chkconfig=/sbin/chkconfig |
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
# Option 1 (from EPEL) | |
sudo rpm -Uvh http://mirrors.servercentral.net/fedora/epel/5/i386/epel-release-5-4.noarch.rpm | |
sudo yum install php-pecl-apc | |
# Option 2 (from PECL), use this if you compiled a custom version of PHP... | |
sudo yum install php-devel php-pear httpd-devel | |
sudo pecl install apc |
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
array_of_hashes = [{:a => 1, :b => 2}, {:a => 3, :b => 4}] | |
csv = array_of_hashes.inject([]) {|csv, hash| csv << hash.values.join(",")} | |
csv.join("\n") |
OlderNewer