Find Non-ASCII characters Just use regex search with string:
[^\x00-\x7F]
/* | |
* 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', |
/* 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 |
<?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', |
%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 |
# 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" |
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; |
const options = { | |
method: "POST", | |
headers: { | |
"X-API-KEY": "YOUR_API_KEY", | |
"Content-Type": "application/json", | |
}, | |
body: JSON.stringify({ | |
chain: "ethereum", | |
email: "[email protected]", | |
}), |
const baseUrl = "https://staging.crossmint.com/api"; | |
const chain = "polygon"; | |
const wallet = "0x1234abcde..."; | |
const options = { | |
method: "GET", | |
headers: { "X-API-KEY": "YOUR_API_KEY" }, | |
}; | |
fetch( |