Skip to content

Instantly share code, notes, and snippets.

@thoughtcroft
thoughtcroft / 11.12.2 errors
Created May 28, 2014 02:33
Chef remote_file redirect from http -> https fails
[2014-05-27T23:44:24+00:00] INFO: Processing remote_file[/var/cache/repmgr/repmgr-bugfix-standby-follow-user.tar.gz] action create_if_missing (repmgr::source_install line 40)
[2014-05-27T23:44:24+00:00] DEBUG: touching /var/cache/repmgr/repmgr-bugfix-standby-follow-user.tar.gz to create it
[2014-05-27T23:44:24+00:00] INFO: remote_file[/var/cache/repmgr/repmgr-bugfix-standby-follow-user.tar.gz] created file /var/cache/repmgr/repmgr-bugfix-standby-follow-user.tar.gz
[2014-05-27T23:44:24+00:00] DEBUG: remote_file[/var/cache/repmgr/repmgr-bugfix-standby-follow-user.tar.gz] checking for changes
[2014-05-27T23:44:24+00:00] DEBUG: turning gzip compression off due to filename ending in gz
[2014-05-27T23:44:24+00:00] DEBUG: Cache control headers: {}
[2014-05-27T23:44:24+00:00] DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request
[2014-05-27T23:44:24+00:00] DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request
[2014-05-27T23:44:24+00:00] DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLen
@thoughtcroft
thoughtcroft / Fastfile
Created August 4, 2015 01:03
fastlane_update error
# vi:syntax=ruby
# Customise this file, documentation can be found here:
# https://github.com/KrauseFx/fastlane/tree/master/docs
# All available actions: https://github.com/KrauseFx/fastlane/blob/master/docs/Actions.md
# can also be listed using the `fastlane actions` command
fastlane_version "1.13.1"
default_platform :ios
@thoughtcroft
thoughtcroft / GetSubFormControlName.vb
Last active August 1, 2016 23:50
2005-11-25-get-subform-control-name.md
Public Enum ControlNameFormat
cnfcShortPropertyName
cnfcLongHierarchicalName
End Enum
Public Function GetSubFormControlName( _
ByRef frm As Form, _
Optional ByVal NameFormat As ControlNameFormat = _
cnfcShortPropertyName) As String
@thoughtcroft
thoughtcroft / SetTextEditMode.vb
Last active February 27, 2021 02:21
2005-11-25-set-text-edit-mode.md
Public Enum TextEditMode
temcInvalid = 0
temcLockedTrue = 2 ^ 0
temcLockedFalse = 2 ^ 1
temcEnabledTrue = 2 ^ 2
temcEnabledFalse = 2 ^ 3
temcEnterWithEdit = temcLockedFalse + temcEnabledTrue
temcEnterNoEdit = temcLockedTrue + temcEnabledTrue
temcNoEnterNormal = temcLockedTrue + temcEnabledFalse
temcNoEnterDimmed = temcLockedFalse + temcEnabledFalse
@thoughtcroft
thoughtcroft / ExampleUse.vb
Last active August 1, 2016 23:59
2007-03-01-how-to-tell-if-an-access-report-was-printed.md
Private rps As ReportPrintStatus
Private Sub Report_Close()
If rps.Printed Then
' Do something
End If
End Sub
Private Sub Report_Open(Cancel As Integer)
' Sink the reports events so we can determine if it was printed or not
@thoughtcroft
thoughtcroft / CopyExcelData.vb
Created August 2, 2016 00:03
2007-10-12-copy-data-between-excel-workbooks.md
Public Sub CopyExcelData( _
ByRef wkbSource As Object, _
ByRef wkbTarget As Object, _
Optional ByVal blnCopyEmptyCells As Boolean = True)
'*** Change to remove control chars as it crashes Excel 97 ***'
' Copy all data entry cells from one workbook
' to the other assuming that a data entry cell
' is:
@thoughtcroft
thoughtcroft / ThisOutlookSession.vb
Last active August 2, 2016 00:13
2008-03-19-automatic-account-assignment-in-outlook.md
Dim MyNewMailHandler As clsNewMailHandler
Private Sub Application_Quit()
Set MyNewMailHandler = Nothing
End Sub
Private Sub Application_Startup()
Set MyNewMailHandler = New clsNewMailHandler
End Sub
@thoughtcroft
thoughtcroft / tcStripChars.vb
Created August 2, 2016 00:26
2008-06-18-strip-types-of-characters-from-a-string.md
' Note: VBA6 is a conditional compiler constant that indicates
' the version of VBA and in this module we use enumerated types if
' supported otherwise we use plain old public constants
#If CBool(VBA6) Then
' Enumerate methods for selecting mode of character removal
Public Enum StripCharsMode
scmcRemoveAlphas = 2 ^ 0
scmcRemoveControl = 2 ^ 1
scmcRemoveNumerics = 2 ^ 2
@thoughtcroft
thoughtcroft / AppState.vb
Created August 2, 2016 00:33
2008-06-19-automation-manager-class.md
' Class for defining an application state which can be
' saved and restored using the AppStateMgr class
' Developed by Warren Bain on 16/11/2006
' Copyright (c) Thought Croft Pty Ltd
' http:\\www.thoughtcroft.com
' All rights reserved.
Option Explicit
@thoughtcroft
thoughtcroft / GeneratePassword.vb
Created August 2, 2016 00:37
2008-06-24-password-generator.md
Public Function GeneratePassword( _
ByVal intLength As Integer) As String
' Generates a random string of digits of the requested length
' In:
' intLength - number of digits to be returned (max 9)
' Out:
' Return Value - a random string of digits
' Example: