Skip to content

Instantly share code, notes, and snippets.

View dk5ax's full-sized avatar
🏠

Markus Hammelmann dk5ax

🏠
View GitHub Profile
@khalidx
khalidx / node-typescript-esm.md
Last active October 18, 2025 09:49
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@DavidWells
DavidWells / github-proxy-client.js
Last active March 3, 2025 17:47
Full Github REST api in 34 lines of code
/* Ultra lightweight Github REST Client */
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const token = 'github-token-here'
const githubClient = generateAPI('https://api.github.com', {
headers: {
'User-Agent': 'xyz',
'Authorization': `bearer ${token}`
}
})
@iamwill
iamwill / gliderecord_cheatsheet.md
Last active October 24, 2025 05:43
GlideRecord cheatsheet

GlideRecord & GlideAggregate Cheat Sheet ❗

GlideRecord(String tableName) ❗

var gr = new GlideRecord('incident'); // use the incident table
gr.query(); // fetch data from the database
while (gr.next()) { // advance
    gs.info(gr.short_description);
}
@cmcdevitt
cmcdevitt / open_sec_incident.js
Created February 15, 2018 12:07
ServiceNow Scripted RESTAPI
// POST /api/auclg/v1/si/security_incidents
// Content-Type application/json Accept application/json
(function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
//Creat Security Incident
var caller;