Skip to content

Instantly share code, notes, and snippets.

View seanbamforth's full-sized avatar

Sean Bamforth seanbamforth

View GitHub Profile
@seanbamforth
seanbamforth / oTailTest.pkg
Last active October 12, 2023 11:32
Logging via "tail.exe"
External_Function WinAPI_GetCurrentProcessId "GetCurrentProcessId" Kernel32.Dll Returns Integer
External_Function WinAPI_EnumProcessModules "EnumProcessModules" Psapi.Dll Handle hProcess Address lphModule Integer cb Pointer lpcbNeeded Returns Integer
External_Function WinAPI_CloseHandle "CloseHandle" Kernel32.Dll Handle hObject Returns Integer
External_Function WinAPI_OpenProcess "OpenProcess" Kernel32.Dll DWord dwDesiredAccess Boolean bInheritHandle DWord dwProcessId Returns Handle
Define PROCESS_TERMINATE for |CI$0001
Define PROCESS_CREATE_THREAD for |CI$0002
Define PROCESS_SET_SESSIONID for |CI$0004
Define PROCESS_VM_OPERATION for |CI$0008
Define PROCESS_VM_READ for |CI$0010
@seanbamforth
seanbamforth / AmazonEtagHashForFile.ps1
Last active September 21, 2023 13:48
Calculate Amazon eTag hash for named file. Powershell
#Calculates an eTag for a local file that should match the S3 eTag of the uploaded file.
$md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
$blocksize = (1024*1024*5)
$startblocks = (1024*1024*16)
function AmazonEtagHashForFile($filename) {
$lines = 0
[byte[]] $binHash = @()
@seanbamforth
seanbamforth / stadiafix.src
Created June 25, 2021 10:23
Fix stadia connection - dataflex
Use Windows.pkg
Object oTest is a ModalPanel
Set Location to 10 5
Set Size to 20 61
Set Label to "On the top"
Set Window_Style WS_SYSMENU to False
Object oButton1 is a Button
Set Location to 3 4
@seanbamforth
seanbamforth / shroggs-pavilion.md
Last active June 13, 2021 13:48
Shroggs Park Pavilion

CONSTITUTION Of Save Shroggs Park Pavilion Group.

1. Name:

The name of the group shall be: “Save Shroggs Park Pavilion Group.”

2. Aim:

To bring the Shroggs Park Pavilion back into use, and encourage more sports to use the pavilion and other sports facilities at Shroggs Park.

@seanbamforth
seanbamforth / oadate.php
Created September 24, 2013 10:21
PHP OADate formatting - To and From...
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if ( ! function_exists('toOADate'))
{
function toOADate($timestamp) {
$from_date = new DateTime("1899-12-30");
$to_date = new DateTime($timestamp);
$interval = $from_date->diff($to_date);
return $interval -> days;
@seanbamforth
seanbamforth / crafts_engineer.md
Created August 3, 2012 09:10
Craftsperson or Engineer? Maybe neither.
Struct tIndexFinder
Integer iFile
Integer iField
Integer iIndex
String sColumn
End_Struct
Object oIndexID is a cObject
Property tIndexFinder[] pIndexFinderList
Property tIndexFinder pLastItem
@seanbamforth
seanbamforth / oTestSave
Last active December 22, 2015 13:59
Visual Dataflex - Example of Parent Child Saving using Business Processes.
Object oTestSave is a BusinessProcess
Object oVendor_DD is a Vendor_DataDictionary
End_Object
Object oInvt_DD is a Invt_DataDictionary
Set DDO_Server to oVendor_DD
End_Object
Object oCustomer_DD is a Customer_DataDictionary
Send DefineAllExtendedFields
@seanbamforth
seanbamforth / govern.md
Last active December 16, 2015 18:20
Thoughts on Agile in Government Projects.

Some random thoughts on using Agile in Government Projects.

Safety

I believe that Agile is just as safe as Waterfall. Nuclear Reactors, etc may use Waterfall methodologies, but it's Formal methods that make them safe. You'd think Waterfall would be safer for development because everything is always having to be signed off, but really - it's not. BTW - Formal methods are hideously expensive and are probably overkill for this type of project.

@seanbamforth
seanbamforth / install.sh
Created September 19, 2012 14:59
Install what's needed into ubuntu
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install