Skip to content

Instantly share code, notes, and snippets.

View richardschoen's full-sized avatar

Richard Schoen richardschoen

View GitHub Profile
@richardschoen
richardschoen / RtnDspAtr.RPGLE
Created January 7, 2025 13:12 — forked from chrishiebert/RtnDspAtr.RPGLE
RtnDspAtr Return Display Attribute hex code for RPGLE and 5250 screens.
// Based: Croy, Steve (2005) Display-attributes-made-simple/setcolor [Source code]. http://search400.techtarget.com/tip/Display-attributes-made-simple
// --------------------------------------------------
// Procedure name: RtnDspAtr
// Purpose: Return Display Attribute hex code that can be used on a
// screen to set color, underline, or other attributes.
// Returns: DSPATR hex value
// Parameter: Color Value - Text representing a color 'GRN' (default)
// other values: 'BLU' 'PNK' 'RED' 'TRQ' 'WHT' 'YLW'
@richardschoen
richardschoen / windows-search-index.txt
Created December 20, 2024 13:57 — forked from tonylambiris/windows-search-index.txt
Remove Windows.edb search index
Run "services.msc" and find "Windows Search" then stop the service.
Delete the Windows.edb file. (C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.edb)
Click "Modify" in the Indexing Options panel and click "Delete and Rebuild" for the index.
@richardschoen
richardschoen / building_ibm_db2.md
Created August 20, 2024 23:05 — forked from kadler/building_ibm_db2.md
Building ibm_db2 on IBM i 7.2 with Zend PHP

Building ibm_db2 on IBM i

Setup

We need to install various packages in order to build ibm_db2. Most of these can be installed with yum:

yum group install 'Development tools'
yum install git
@richardschoen
richardschoen / README.md
Created August 13, 2024 13:24 — forked from NicolasSchindler/README.md
How to connect IBM i to LDAP Server

How to connect a LDAP Server to IBM i

In this Project i provide a simple example how to connect to a LDAP Server from IBM i. I added some Constants and Functions from the LDAP Headerfile provided by IBM, not all Functions are implemented in this example. The Serviceprogramm is written in Fixed Format RPGLE and uses the provided LDAP API written in C, which is included in the OS. The Documentation of the LDAP API can be found here

Thanks to @ScottKlement, who has published an example of a copybook on his site, which I have used as a guide. You can find his example here. Also thanks to @m1h43l for helping me with handling the null-terminated strings in the RPG Code.

@richardschoen
richardschoen / SQLite-PHP-quickstart.php
Created August 13, 2024 03:43 — forked from bladeSk/SQLite-PHP-quickstart.php
SQLite3 PHP Quickstart Tutorial
<?php
// This file walks you through the most common features of PHP's SQLite3 API.
// The code is runnable in its entirety and results in an `analytics.sqlite` file.
// Create a new database, if the file doesn't exist and open it for reading/writing.
// The extension of the file is arbitrary.
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
// Errors are emitted as warnings by default, enable proper error handling.
@richardschoen
richardschoen / SQLite-PHP-quickstart.php
Created August 13, 2024 03:43 — forked from bladeSk/SQLite-PHP-quickstart.php
SQLite3 PHP Quickstart Tutorial
<?php
// This file walks you through the most common features of PHP's SQLite3 API.
// The code is runnable in its entirety and results in an `analytics.sqlite` file.
// Create a new database, if the file doesn't exist and open it for reading/writing.
// The extension of the file is arbitrary.
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
// Errors are emitted as warnings by default, enable proper error handling.
@richardschoen
richardschoen / simplerelay.py
Created August 8, 2024 13:34 — forked from JCotton1123/simplerelay.py
Start of simple SMTP relay service in Python
#!/usr/bin/env python
import os
import re
import daemon
import asyncore
import smtpd
class SimpleRelayService(smtpd.PureProxy):
"""Handles processing mail for relay"""
@richardschoen
richardschoen / HowTo_Install_dotnet8_Raspberry.md
Last active April 11, 2024 23:02 — forked from ramonsmits/HOWTO.md
Install .NET 8 on Raspberry pi
-- category: Bryan.Dietz
-- description: Jobs in msgw(wrkactjob)
SELECT Job_Name
,Subsystem
,Function_Type CONCAT '-' CONCAT Function AS "Function"
,Job_Status
,(SELECT Message_Text
FROM TABLE (Qsys2.Joblog_Info(I.Job_Name)) A
ORDER BY Ordinal_Position DESC
#!/bin/sh
file=path/to/file
bucket=your-bucket
resource="/${bucket}/${file}"
contentType="application/x-compressed-tar"
dateValue="`date +'%a, %d %b %Y %H:%M:%S %z'`"
stringToSign="GET
${contentType}
${dateValue}
${resource}"