Skip to content

Instantly share code, notes, and snippets.

View richardschoen's full-sized avatar

Richard Schoen richardschoen

View GitHub Profile
@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}"
@richardschoen
richardschoen / gitcommitchgs.sh
Created May 27, 2020 13:56
Single sample bash command to stage, commit, push and pull changes to remote git repository with timestamped comment
#!/bin/bash
# This script can be used to commit changes to git repo and push to
# remote repo all in one command.
TODAY=$(date)
HOST=$(hostname)
git add .
git commit -m "Changes committed: $TODAY from $HOST"
git push
git pull
@richardschoen
richardschoen / sqlitedbtest1.py
Created March 6, 2020 13:59
Python 3 Script to Test SQLite DB
#!/usr/bin/python
#------------------------------------------------
# Script name: sqlitedbtest1.py
#
# Description:
# This script is a good test program for SQLite DB
# functionality.
#
# Parameters:
# P1=
@richardschoen
richardschoen / ODBCCoreTest1.cs
Created February 26, 2020 13:32
Test IBMi Access ODBC Driver on Linux, Windows or IBM i
using System;
using System.Text;
using System.Data;
using System.Data.Odbc;
using System.Collections.Generic;
namespace OdbcCoreTest1
{
// https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzaik/connectkeywords.htm
// https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/rzaik/rzaikodbc64bitrestrictions.htm
@richardschoen
richardschoen / gist:3abab4dce5b9e1254313219f38feb45a
Created February 26, 2020 13:31
Turn on trace with IBMi Access ODBC Driver
/opt/ibm/iaccess/bin/cwbtrc /dt:1 # enable trace
# run code to recreate here
/opt/ibm/iaccess/bin/cwbtrc /dt:0 # disable trace
/opt/ibm/iaccess/bin/cwbmedic # generate diagnostic tar file
@richardschoen
richardschoen / gist:78ed5bd3b0656ba8eb4adfff9715e811
Created November 1, 2018 12:20
C# - set directory permissions for Everyone to Full Control. Useful when you need to store settings and other files in your app directory
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Principal;
using System.Security.AccessControl;
using System.IO;
namespace RSSetDirPermissionsCS
@richardschoen
richardschoen / IBMiXmlserviceRemoteCommand
Created August 27, 2017 21:34
IBM i XMLSERVICE remote command call sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IbmiXmlserviceStd;
namespace IbmiXmlServiceCommandSample1Cs
{
class Program
@richardschoen
richardschoen / DataTableToJsonObj.cs
Created August 27, 2017 21:29
DataTable Object to JSON Object using String Builder
public string DataTableToJsonObj(DataTable dt)
{
DataSet ds = new DataSet();
ds.Merge(dt);
StringBuilder JsonString = new StringBuilder();
if (ds != null && ds.Tables[0].Rows.Count > 0)
{
JsonString.Append("[");
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{