Skip to content

Instantly share code, notes, and snippets.

@cverbiest
cverbiest / list_indexstat.p
Last active August 29, 2015 14:22
OpenEdge _IndexStat csv export
/*
Code to generate csv file from _IndexStat
Comment from George Potemkin
https://community.progress.com/community_groups/openedge_rdbms/f/18/p/17913/65295.aspx#65295
This program uses the _IndexStat-split and _IndexStat-blockdelete fields.
Due to a Progress bug the value of "blockdelete" field is always zero and the value in "split" field is incorrect.
The same is true for _UserIndexStat and for promon. They all read the correct bytes in shared memory.
It's the Progress clients who update a wrong counter when a block is deleted (freed) from index tree.
routefile=$(mktemp)
route > $routefile 2>&1
zenity --text-info --font='Monospace 8' --filename=$routefile --height=480 --width=700
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Aug 25
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
finish
endif
let did_load_filetypes = 1
@cverbiest
cverbiest / mklike
Last active August 29, 2015 14:23
Create a file/directory with same owner and permissions
#!/bin/bash
# Create a file / directory with same rights as an exiting one
typeset local
Usage() {
echo Usage $0 -r reference_file|reference_dir new_file|new_dir ...
exit 1
}
@cverbiest
cverbiest / ocxlib_debug_list
Last active August 29, 2015 14:23
debug listing for OCX library
DEFINE VARIABLE WZ-OCXFile AS CHARACTER NO-UNDO.
DEFINE VARIABLE WZ-Alternate-OCXFile AS CHARACTER no-undo init ?.
/* Version 3 first */
WZ-OCXFile = SEARCH( "xhtml0300.wrx":U ).
WZ-Alternate-OCXFile = SEARCH( "xhtml0200.wrx":U ).
/* Definitions of handles for OCX Containers */
def temp-table T-XSEDITOR no-undo
field TXS-IDENT as char
field TXS-WIDGET AS WIDGET-HANDLE
@cverbiest
cverbiest / excel_macro_dbanalys2table
Created July 3, 2015 07:54
Excel macro to convert proutil dbanalys txt output to columns
Sub dbanalys2table()
'
' dbanalys2table Macro
'
' FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1)), TrailingMinusNumbers:=True
Range("A1").Replace What:="Time stamp", Replacement:="""Time Stamp"""
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
<html>
<head>
<script>
TestVibrate()
{
navigator.vibrate = navigator.vibrate ||
navigator.webkitVibrate ||
navigator.mozVibrate ||
navigator.msVibrate;
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType progress set omnifunc=syntaxcomplete#Complete
set isfname-==
" colorscheme doriath
set aw shiftwidth=4 tabstop=4 nohls expandtab
set smartcase
# 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.
#
@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 ;}'