Find Non-ASCII characters Just use regex search with string:
[^\x00-\x7F]
| <?php | |
| class PreventAccessHook | |
| { | |
| public function preventAccess($bean, $event, $args) { | |
| global $db, $current_user, $log; | |
| // allow admins to view records | |
| if ($current_user->is_admin && $event !== 'before_delete') { | |
| return; |
Find Non-ASCII characters Just use regex search with string:
[^\x00-\x7F]
| # compare two branches (master and temp) | |
| git log --graph --decorate --pretty=oneline --abbrev-commit master origin/master temp | |
| # pull an old file and overwrite current | |
| git checkout 'master@{7 days ago}' -- path/to/file.txt | |
| # log changes before a date | |
| git log --stat --before="2017-05-09" |
| %YAML 1.2 | |
| --- | |
| name: SugarCRM Log | |
| scope: source.sugarcrmlog | |
| contexts: | |
| main: | |
| - match: \w{3}\s?\w{3}\s?\d{2}\s?\d{2}:\d{2}:\d{2}\s?\d{4} | |
| scope: text.sugar_log_date_string |
| <?php | |
| // this allows adding a new custom field to the core module table | |
| <?php | |
| $dictionary['Account']['fields']['new_field'] = array( | |
| 'name' => 'new_field', | |
| 'vname' => 'LBL_NEW_FIELD', | |
| 'type' => 'varchar', | |
| 'len' => '255', |
| /* just throw this in the initialize method of your custom view */ | |
| window.Handlebars.registerHelper('trimString', function(module) { | |
| var moduleShort = module.substring(0,2); | |
| return new Handlebars.SafeString(moduleShort); | |
| }); | |
| // force extra lines |
| /* | |
| * I only wanted to apply this change to the Contacts modules so I put this file in: | |
| * custom/modules/Contacts/clients/base/fields/fullname/ | |
| */ | |
| ({ | |
| extendsFrom: 'FullnameField', | |
| formatMap: { | |
| 'f': 'first_name', | |
| 'l': 'last_name', |
| <?php | |
| if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
| class ExampleNonAuthApi extends SugarApi | |
| { | |
| public function registerApiRest() { | |
| return array( | |
| 'SampleEndpoint' => array( | |
| 'reqType' => 'POST', |