Replace yourdomain with your service now URL. User must have the rest_service role.
This file contains hidden or 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
| var SubststitutionHelper = Class.create(); | |
| SubststitutionHelper.prototype = { | |
| initialize: function(record) { | |
| this.log = new GSLog("intuit.custom.debug.level", this.type); | |
| this.record = record; | |
| // preload variables for request item | |
| this.variables = {}; | |
| if(this.record.getTableName() == 'sc_req_item'){ | |
| this.preloadVariables(); | |
| } |
This file contains hidden or 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
| import pymssql | |
| import pandas as pd | |
| ## instance a python db connection object- same form as psycopg2/python-mysql drivers also | |
| conn = pymssql.connect(server="172.0.0.1", user="howens",password="some_fake_password", port=63642) # You can lookup the port number inside SQL server. | |
| ## Hey Look, college data | |
| stmt = "SELECT * FROM AlumniMirror..someTable" | |
| # Excute Query here | |
| df = pd.read_sql(stmt,conn) |
This file contains hidden or 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
| // This sample code shows how to use GRDB to synchronize a database table | |
| // with a JSON payload. We use as few SQL queries as possible: | |
| // | |
| // - Only one SELECT query. | |
| // - One query per insert, delete, and update. | |
| // - Useless UPDATE statements are avoided. | |
| import Foundation | |
| import GRDB |
Watch out performance of your queries!
var sw = new GlideStopWatch();
var recGR = new GlideRecord('cmdb_ci');
recGR.addQuery('sys_class_name', 'INSTANCEOF', 'cmdb_ci_server');
recGR.addQuery('name', 'ABCDEF');
recGR.setLimit(1);
recGR.query();
if (recGR.hasNext()) {
This file contains hidden or 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
| <# | |
| Ported to powershell2 from script by Laurent Kempé | |
| http://laurentkempe.com/2016/04/07/Upload-files-to-DropBox-from-PowerShell/ | |
| .SYNOPSIS | |
| This is a Powershell script to upload a file to DropBox using their REST API. | |
| .DESCRIPTION | |
| This Powershell script will upload file to DropBox using their REST API with the parameters you provide. |
This file contains hidden or 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
| # will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904 | |
| function jwt-decode() { | |
| sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq | |
| } | |
| JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ | |
| jwt-decode $JWT |
This file contains hidden or 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
| /* | |
| Script Include definition: | |
| Name: JournalRedactor | |
| Client Callable: false | |
| Accessible from: All application scopes | |
| Additional details: | |
| Version: 1.3 | |
| Usage documentation: http://redactor.snc.guru/ | |
| License: https://gist.github.com/thisnameissoclever/767b8a738b929a0bd943965431061c1e | |
| */ |
This file contains hidden or 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
| # EditorConfig is awesome: http://EditorConfig.org | |
| # top-most EditorConfig file | |
| root = true | |
| # Unix-style newlines with a newline ending every file | |
| [*] | |
| charset = utf-8 | |
| indent_style = space | |
| indent_size = 2 |
User gets this message in a list of records whenever there is a record user doesn't have rights to view. I.e. there is an ACL restricting access to a record or there in NO ACL granting the access. Let's ignore security mode setting here.
It's a default system beharior.
Would you like to get rid of it? System to count with records user has access to?
Replicate row level read access ACLs to query business rules. Naturally, every query will get controlled.
OlderNewer