This file contains 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 demoOnClick() { | |
// CLIENT-SIDE CODE GOES HERE | |
// DATA STORAGE | |
var responseData = JSON.stringify(null); // Replace null with real data | |
if (typeof g_list !== 'undefined' && g_list) { | |
g_list.filter = responseData; | |
return g_list.action(undefined, 'sysverb_XXX'); | |
} else { | |
addHidden( |
This file contains 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
(define-nyxt-user-system-and-load "nyxt-user/nx-passt" | |
:depends-on (:nx-passt) :components ("passt.lisp")) |
This file contains 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
;; Ensures that any change pushed to the systemd environment (e.g.: via dbus-update-activation-environment) immediately applies to the Emacs daemon process without needing to kill it first | |
;; This is useful for example if you run Emacs as a systemd user service and it happens to start before your WM, since this normally causes DISPLAY / WAYLAND_DISPLAY to be missing | |
;; Ensuring the variable is synced will fix issues like GUI apps not launching when invoked by emacs (e.g.: via xdg-open/shell mode) | |
;; Obviously, this code depends on D-Bus! | |
(dbus-register-monitor | |
:session | |
(lambda (&rest args) | |
(unless (null args) | |
(mapc | |
(lambda (var-expression) |
This file contains 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
# These oneliners summon a mouse-based region picker, OCRs the selected area, then sends the text to goldendict. I use these in my linux desktop keybind config files | |
# NOTE: Goldendict needs to be configured for your target language! For Japanese, see https://jd4gd.com/index.html | |
# NOTE: Available languages for gazou are "jpn", "chi_sim", and "chi_trad" | |
# Wayland version | |
# Requirements: grim (wayland screenshotter), slurp (wayland region picker), gazou (OCR), goldendict (dictionary) | |
# Arch/Paru requirements install: paru -S community/grim community/slurp aur/gazou-git aur/goldendict | |
grim -g "$(slurp)" - | gazou -l jpn | xargs -I{} goldendict "{}" | |
# X11 version |
This file contains 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 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 file contains 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 |
This file contains 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
export const StaticNowMap: IStaticNowMap = { | |
// Scriptable files | |
"SysNamesMap": { | |
"Data Model": { | |
"Relationships": "sys_relationship" | |
}, | |
"Forms & UI": { | |
"Schedule Pages": "cmn_schedule_page", | |
"Styles": "sys_ui_style", | |
"Map Pages": "cmn_map_page", |
This file contains 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
/* eslint-disable */ | |
var babelHelpers = (function() { | |
var decoratorsApi = { | |
elementsDefinitionOrder: [["method"], ["field"]], | |
initializeInstanceElements: function (O, elements) { | |
["method", "field"].forEach(function (kind) { | |
elements.forEach(function (element) { | |
if (element.kind === kind && element.placement === "own") { | |
this.defineClassElement(O, element); | |
} |
This file contains 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
/** | |
* Processes a given GlideElement into the closest available JS type | |
* | |
* Will return null if the value is empty or if the field is misconfigured. | |
* Will return undefined if value is exactly equal to undefined. | |
* | |
* Note that journals will only yield HTML output if both preferFullJournal and preferHtml options are true. | |
* | |
* @param {GlideElement_proto} value The GlideElement to convert | |
* @param {Object} [options] Options container. All provided options are off by default |
NewerOlder