Comprehensive analysis of the
cc-srcrepository
Date: 2026-04-13
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
| ARG UBUNTU_RELEASE=24.04 | |
| ARG CHISEL_VERSION=v1.1.0 | |
| FROM eclipse-temurin:21-jdk-noble AS build | |
| ADD https://github.com/spring-projects/spring-petclinic.git /app | |
| WORKDIR /app | |
| RUN ./mvnw package | |
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
| cls | |
| taskkill /F /FI "USERNAME eq %username%" /IM rdpclip.exe | |
| ping -n 1 -w 1000 1.1.1.1>nul | |
| start rdpclip.exe |
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 is a list of all Java classes that are whitelisted for use in global ServiceNow background scripting as of the Tokyo release | |
| Everything is derived from log output of GlideWhiteListManager.get().logMemberWhitelistEntries() and GlideWhiteListManager.get().logClassWhitelistEntries() | |
| Many, but NOT ALL of these should be accessible via the global "Packages" object. | |
| - e.g. The Java string class (java.lang.String) can be accessed as: Packages.java.lang.String | |
| FYI: ServiceNow has deprecated directly accessing Java classes in this way and will REFUSE to support customer code that does this | |
| NOTE: java.* classes will generally be aligned with JDK 8 and are fully documented in the public JavaDocs | |
| - https://docs.oracle.com/javase/8/docs/api/index.html |
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
| //Client-side | |
| doThing(); | |
| function doThing() { | |
| let eGR = new EfficientGlideRecord('incident') | |
| .setLimit(10) | |
| .addNotNullQuery('assignment_group') | |
| .addField('number') | |
| .addField('short_description') | |
| .addField('assignment_group', true) //Get display value as well |
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
| //Client-side example usage | |
| doThing(); | |
| function doThing() { | |
| new EfficientGlideRecord('incident') | |
| .setLimit(10) | |
| .addNotNullQuery('assignment_group') | |
| .addField('number') | |
| .addField('short_description') | |
| .addField('assignment_group', true) //Get display value as well |
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
| /** | |
| * Get the journal entries from a given record, and optionally parse and convert line breaks and | |
| * HTML and wokkas (< and >) to HTML (<br />\n and HTML-ized character codes). | |
| * @param {GlideRecord} current - A GlideRecord object positioned to the record you want to get the | |
| * journal entries from. | |
| * @param {String} journalFieldName - The journal field name (e.g. "work_notes", "comments", | |
| * "comments_and_work_notes", etc.). | |
| * @param {Boolean} [convertLineBreaksToHTML=false] - Set this to true, to convert line-breaks | |
| * (\r\n) to HTML (<br />\n). | |
| * @param {Boolean} [convertWokkasToHTML=false] - Set this to true, to convert wokkas ("<" and ">") |
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
| // ==UserScript== | |
| // @name SNOW CodeMirror Vim activator & embiggener | |
| // @description Enables vim mode for ServiceNow in most script editor fields. Also enlarges the field! | |
| // @namespace https://gist.githubusercontent.com/chaorace/dc49a18f876a9814c8b27d637bfb4f44/raw/sn-vimify.user.js | |
| // @updateURL https://gist.githubusercontent.com/chaorace/dc49a18f876a9814c8b27d637bfb4f44/raw/sn-vimify.user.js | |
| // @supportURL https://gist.github.com/chaorace/dc49a18f876a9814c8b27d637bfb4f44 | |
| // @include http://*.service-now.com/* | |
| // @include https://*.service-now.com/* | |
| // @require https://codemirror.net/3/keymap/vim.js | |
| // @run-at document-idle |
UI Page consists of jelly, client script and processing script. UI Macro has the jelly script only (but client script can be injected in jelly script) Usages:
- Open as a page using URI
https://<instance_name>.service-now/<ui_page_name>.do - Open as a modal using client script (UI action, client script, etc) (see snippet 1)
// Snippet 1
var gm = new GlideModal('UI_dialog_name');
gm.setTitle('Show title');NewerOlder