Skip to content

Instantly share code, notes, and snippets.

View mbtools's full-sized avatar
📦
Get things rolling for ABAPConf 2024

Marc Bernard mbtools

📦
Get things rolling for ABAPConf 2024
View GitHub Profile
@g-back
g-back / zcl_im_cts_request_check.abap
Created November 16, 2021 15:43
Example, CTS BAdI: Check if objects are included in abapGit repos
CLASS zcl_im_cts_request_check DEFINITION
PUBLIC
FINAL
CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES if_ex_cts_request_check.
PROTECTED SECTION.
PRIVATE SECTION.
@jongio
jongio / PhotoOrganizer.ps1
Created March 3, 2021 15:34
A PowerShell script to organize photos by date taken
Param(
[string]$source,
[string]$dest,
[string]$format = "yyyy/yyyy_MM/yyyy_MM_dd"
)
$shell = New-Object -ComObject Shell.Application
function Get-File-Date {
[CmdletBinding()]
@larryclaman
larryclaman / convert-to-spot.ps1
Created April 8, 2020 19:23
Convert an Azure VM to a Spot VM type
<# Convert a VM to a Spot VM
Based on sample script at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/change-availability-set
NOTE: Extensions will not be copied to new instance!!
#>
# Set variables to your specifics
$resourceGroup = "myRG"
$vmName = "myVM"
# Get the details of the VM to be moved to the Availability Set
@sandraros
sandraros / test_of_cl_http_utility_unescape_url.abap
Last active August 17, 2020 14:00
Test class to verify the behavior of cl_http_utility=>unescape_url, that all escaped characters (from %00 to %EF%BF%BF which are equivalent to U+0000 to U+FFFF) are unescaped correctly, and more...
* SUMMARY OF SPECIFIC BEHAVIORS:
*
* input string (formatted as string template) returned string (formatted as string template)
* ------------------------------------------- -----------------------------------------
* any string containing %00 return empty string
* unencoded null character null character returned unchanged
* A%0AB A\nB
* A%0DB A\rB
* A%B return empty string
* A+B A B
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@nopjia
nopjia / splitPath.js
Last active November 7, 2022 16:22
The ultimate split path, with a single regex
/**
* The ultimate split path.
* Extracts dirname, filename, extension, and trailing URL params.
* Correct handles:
* empty dirname,
* empty extension,
* random input (extracts as filename),
* multiple extensions (only extracts the last one),
* dotfiles (however, will extract extension if there is one)
* @param {string} path
@anvaka
anvaka / 00.Intro.md
Last active May 5, 2024 12:24
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
@webaware
webaware / private-debug-log.php
Created February 17, 2013 02:17
Enable WordPress debug log to a private folder not accessible from the web. See http://wordpress.stackexchange.com/q/84132/24260 for details and motivations. NB: currently needs to be manually edited to specify the private folder path;
<?php
/*
Plugin Name: Private Debug Log
Description: Enable debug log to a private folder not accessible from the web
Version: 0.0.1
Author: WebAware
Author URI: http://www.webaware.com.au/
*/
/*