Note
- You can copy any part that you want. Feel free!
- You can skip Step 1 and 2 if you aleady installed Poetry.
python3 -m pip install poetry| cls | |
| taskkill /F /FI "USERNAME eq %username%" /IM rdpclip.exe | |
| ping -n 1 -w 1000 1.1.1.1>nul | |
| start rdpclip.exe |
| 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 |
| //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 |
| //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 |
| /** | |
| * 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 ">") |
| // ==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:
https://<instance_name>.service-now/<ui_page_name>.do// Snippet 1
var gm = new GlideModal('UI_dialog_name');
gm.setTitle('Show title');| -- Script to create Oracle's "SCOTT" schema with tables | |
| -- EMP, DEPT, BONUS, SALGRADE, DUMMY. Originally demobld.sql. | |
| -- | |
| -- In a format suitable for pasting into SQL Fiddle: | |
| -- http://sqlfiddle.com/#!4 | |
| -- | |
| create table dept( | |
| deptno number(2,0) not null, | |
| dname varchar2(14), | |
| loc varchar2(13)); |
| Base64 Code | Mnemonic Aid | Decoded* | Description |
|---|---|---|---|
JAB |
🗣 Jabber | $. |
Variable declaration (UTF-16), e.g. JABlAG4AdgA for $env: |
TVq |
📺 Television | MZ |
MZ header |
SUVY |
🚙 SUV | IEX |
PowerShell Invoke Expression |
SQBFAF |
🐣 Squab favorite | I.E. |
PowerShell Invoke Expression (UTF-16) |
SQBuAH |
🐣 Squab uahhh | I.n. |
PowerShell Invoke string (UTF-16) e.g. Invoke-Mimikatz |
PAA |
💪 "Pah!" | <. |
Often used by Emotet (UTF-16) |