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
| // | |
| // Intrux Business Rule Validator | |
| // - checks if the referenced SysIDs used in the 'Filter Conditions' point to existing records | |
| // - pure read only: does not alter anthing | |
| // | |
| // Copyright (c) 2025 Intrux GmbH | |
| // All rights reserved. | |
| // | |
| if (['global', 'rhino.global'].indexOf(gs.getCurrentScopeName()) == -1) { |
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
| # uncompyle6 version 3.9.3.dev0 | |
| # Python bytecode version base 2.3 (62011) | |
| # Decompiled from: Python 3.8.10 (default, Jul 29 2024, 17:02:10) | |
| # [GCC 9.4.0] | |
| # Embedded file name: /tmp/bf2c/bf2hub/HttpClient.py | |
| # Compiled at: 2014-09-03 19:41:22 | |
| import socket, string | |
| from urlparse import urlparse | |
| class HttpClient: |
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
| // the dns implementation was removed from the gamespy-emulator because i found that | |
| // redirecting calls from ::gethostbyname requires less technical boiler plate and | |
| // who'd want to change their dns configuration anyways? | |
| // dns_details.h | |
| #include <string> | |
| #include <cstdint> | |
| #include <vector> | |
| #include <span> | |
| #include <map> |
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
| #!/usr/bin/env swift | |
| import Foundation | |
| import AppKit | |
| let handle = dlopen("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", RTLD_NOW) | |
| guard let symConnection = dlsym(handle, "_CGSDefaultConnection"), | |
| let symSetProp = dlsym(handle, "CGSSetConnectionProperty") else { | |
| print("Failed to load CGS symbols") |
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 7 and are fully documented in the public JavaDocs | |
| - https://docs.oracle.com/javase/7/docs/ |
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
| function onChange(control, oldValue, newValue, isLoading) { | |
| if (isLoading || newValue == '') { | |
| return; | |
| } | |
| var today = new Date(); | |
| today.setUTCHours(0, 0, 0, 0); | |
| // | |
| // ServiceNow Date -> JavaScript Date |
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 doc = new XMLDocument2(); | |
| var importNode = doc.createElement('Import'); | |
| createPers(doc, importNode, '12345', 'update', 'Disabled', [{ id: '1', operation: 'delete' }, { id: '2', operation: 'delete' }, { id: '2', operation: 'delete' }]); | |
| createPers(doc, importNode, '23456', 'update', 'Disabled', [{ id: '1', operation: 'delete' }, { id: '2', operation: 'delete' }, { id: '2', operation: 'delete' }]); | |
| createPers(doc, importNode, '34567', 'update', 'Disabled', [{ id: '1', operation: 'delete' }, { id: '2', operation: 'delete' }, { id: '2', operation: 'delete' }]); | |
| sendToMid('helloWorld.xml', doc.toString()); | |
| function sendToMid(fileName, fileContent) { | |
| var saveScript = '(function () {' | |
| + ' try {' |