Skip to content

Instantly share code, notes, and snippets.

@cverbiest
cverbiest / abl-lowercase.code-snippets
Created September 12, 2024 06:06
Vscode lowercase abl snippets
{
"Frame name": {
"scope": "abl",
"prefix": "&FR",
"body": [
"{&FRAME-NAME} $1"
],
"description": "Frame name"
},
"Global define": {
@cverbiest
cverbiest / github oneliners.md
Created July 12, 2023 09:11
GitHub oneliners

List forks of repo

List forks of repo, sorted by pushed date

REPO_OWNER= REPO_NAME= curl https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/forks | jq -j '.[] | ."pushed_at", " https://github.com/" + ."full_name", "\n"' | sort
@cverbiest
cverbiest / bitbucket.md
Last active October 13, 2020 13:55
git oneliners

Bitbucket oneliners

get project & repo slug from BitBucket remote

Parse the output of git remote using awk to determine project & repo slugs

git remote -v | awk '/(push)/{ print $2; split($2, ru, "/"); projectslug = ru[4]; reposlug = gensub(/\.git/, "", "g", ru[5]); print projectslug " " reposlug;}'
@cverbiest
cverbiest / kill_pdsoe_avm.ps1
Last active October 4, 2020 14:17
OpenEdge Powershell snippets
# Kill all PDSOE AVM processes
# These prowin processes have -wy in the commandline
$Filter = "Name like '%prowin%' and Commandline like '% -wy %' "
Write-Host "Filter $Filter"
Get-WmiObject Win32_Process -Filter "$Filter" |
foreach-object `
-begin { Write-Host 'begin' } `
-process {
Write-Host 'Kill' $_.Commandline $_.
@cverbiest
cverbiest / tonew
Created September 4, 2018 05:54
script to copy (rsync) files to new host, tool to help server migration
#!/bin/bash
set -ue
script=$0
script_dir=${script%/*}
script=${script##*/}
SUFFIX=$(date +%y%m%d.%H%M%S)
export RSYNC_RSH=/usr/bin/ssh
@cverbiest
cverbiest / build.xml
Last active August 2, 2019 07:16
build.xml to fix pdsoe
<?xml version="1.0"?>
<project name="Fix_PDSOE" default="build_launcher">
<taskdef resource="PCT.properties" />
<property environment="env"/>
<property name="DLC" value="${env.DLC}" />
<target name="build_launcher">
<mkdir dir="build" />
<mkdir dir="debugListing" />
<PCTCompile graphicalMode="true" destDir="plugins" dlcHome="${DLC}">
@cverbiest
cverbiest / prolist.sh
Created October 12, 2016 15:33
Linux Enhanced proshut list, add process info
#/bin/bash
# Enhance proshut list, show process info for local processes, needs root access
#
proshut $1 -C list | awk '{ if (NR==1) { procinfo="process info"; } else if ($8 == "REMC" || $9=="REMC") { procinfo="remote process"; } else { procfile="/proc/"$2"/cmdline"; getline procinfo < procfile; procinfo = gensub(/\000/, " ", "g", procinfo); } print $0,procinfo ;}'
# The Protermcap File
#
# This file contains definition entries for Progress supported terminals
# as well as terminal entries that are not supported by Progress. These
# unsupported terminals are provided as a courtesy to our customers because
# it is usually much better to have an unsupported terminal entry than
# no entry at all. If you find you need to use one of these unsupported
# terminal entries, please completely test your application on the terminal
# itself before putting it into production use.
#
&scoped db
&scoped-define dfin WZ-DFIN
def var WZ-DFIN as char form "x(65)" init '{&db}.df'.
&scoped-define dfout WZ-DFOUT
def var WZ-DFOUT as char form "x(65)" init '{&db}area.df'.
update WZ-DFIN WZ-DFOUT.
&scoped csvfile '{&db}area.csv'
&scoped filefield 1