Skip to content

Instantly share code, notes, and snippets.

View ahplummer's full-sized avatar

Allen Plummer ahplummer

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ahplummer on github.
  • I am ahplummer (https://keybase.io/ahplummer) on keybase.
  • I have a public key ASBkEvglFaUAyuVnPe9vm-cVcMeh-JdkHeJViccYTnVl-wo

To claim this, I am signing this object:

@ahplummer
ahplummer / JiraIssueImporterPaginate.py
Created May 8, 2017 21:12
Paginates the JIRA API for issue retrieval
def RetrieveJiraIssuesPaginate(baseurl, key, user, password, maxper):
retval = []
base64string = base64.encodestring('%s:%s' % (user, password)).replace('\n', '')
maxResults = maxper
startAt = 0
total = 0
keepgoing = True
while keepgoing:
url = baseurl + '/rest/api/2/search?jql=project=' + key + '&maxResults=' + str(maxResults) + '&startAt=' + str(startAt)
request = urllib2.Request(url)
@ahplummer
ahplummer / AllowBypassKeyPatch.py
Created August 6, 2015 19:56
Patches Microsoft Access ADP files when the 'AllowBypasskey' setting is set to false. This patch will force it to true, thus allowing the user to hit 'shift' key and bypass startup code as normal with Access.
import argparse
import shutil
import os
def inplace_change(filename, old_string, new_string,debug):
with open(filename, mode='rb') as file: # b is important -> binary
fileContent = file.read()
if old_string in fileContent:
if debug == False:
print ('Changing "{old_string}" to "{new_string}"'.format(**locals()))
@ahplummer
ahplummer / ExportAccessObjects.py
Created August 6, 2015 19:54
Exports MS Access objects into text files so that they can be revisioned in Source Control.
from comtypes.client import CreateObject
import shutil
import os
import argparse
parser = argparse.ArgumentParser(description='Mounts Access via COM wrapper, and extracts meta objects.')
parser.add_argument('-file','--file',help='File',required=True)
parser.add_argument('-exportpath','--exportpath',help='Export Path',required=False)
args = vars(parser.parse_args())