Skip to content

Instantly share code, notes, and snippets.

@cawoodm
cawoodm / ZABAPGIT_USER_EXIT.include.abap
Last active March 12, 2024 11:06
CREATE_HTTP_CLIENT Implementation for ZABAPGIT_USER_EXIT
*&---------------------------------------------------------------------*
*& 1. Create this include ZABAPGIT_USER_EXIT inside
*& your ZABAPGIT_STANDALONE program/report
*& 2. Start transaction SM59 and click on 'HTTP Connections to External Server'
*& 3. Click 'Create' button and create destination 'GITHUB' (type G)
*& 4. Host 'github.com' with Port '443'
*& 5. Under 'Logon & Security' select Basic authentication and enter github username and PAT
*& 6. Under 'Security Options' select SSL 'Active' and SSL Certificate 'ANONYM SSL'
*& 7. Save and test
*&---------------------------------------------------------------------*
@cawoodm
cawoodm / tmp.ts
Last active May 11, 2022 13:37
Example of TypeScript AS Compiler Error
interface MyObj1 {
[key: string]: string; // All other properties must be strings
name: string; // Mandatory properties
}
interface MyObj2 {
name: string; // Mandatory properties
age: number
}
let obj1: MyObj1 = {
name: 'foo',
@cawoodm
cawoodm / run.ps1
Created January 15, 2021 04:30
Run Any Code from PowerShell with Piston
<#
.Synopsis
Run any code via the piston API
.Description
Pass in your code and it will be run on a remote machine via the piston API.
See https://github.com/engineer-man/piston for more details
.Parameter Language
The name of the language:
@cawoodm
cawoodm / Explanation of Rankings
Last active August 26, 2019 11:46
Explanation of Rankings
The explanation of "UVV 000155 099" (scoring 15.364279) is:
{
"_shard": "[myindex][0]",
"_node": "6tgOP8JVSmai0c0uR_Co7g",
"_index": "myindex",
"_type": "_doc",
"_id": "UVV -00155-099",
"_score": 15.364279,
"_source": {
store xpath count | //a[@title='Remove from shopping cart'] | count
if | ${count} > 0
echo | Found ${count} buttons!
click | //a[@title='Remove from shopping cart']
else |
echo | Found no buttons
end |
@cawoodm
cawoodm / NodeSP v0.01.js
Created October 21, 2012 18:12
NodeSP (Node Server Pages) is a proof of concept on using Node.js as a web server serving dynamic content generated from .js scripts akin to PHP or other CGI scripts.
var http = require('http'),
url = require('url'),
vm = require('vm'),
fs = require('fs');
// Process request and send response to client
exports.run = function(request, response) {
var res = this.process(request);
response.statusCode = res.statusCode||200;
response.setHeader("Content-Type", res.contentType||"text/html");