Skip to content

Instantly share code, notes, and snippets.

View ptrourke's full-sized avatar

Patrick T. Rourke ptrourke

View GitHub Profile
@ptrourke
ptrourke / pydio-decrypt.py
Created March 26, 2022 17:36 — forked from drzraf/pydio-decrypt.py
Decrypt a file encrypted using Pydio-cells
#!/usr/bin/python3
# Copyright (C) 2020, Raphaël . Droz + floss @ gmail DOT com
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Decrypt a file encrypted using Pydio-cells, assuming are provided
# - export the encrypted master key as exported by the UI
@ptrourke
ptrourke / manifest_extractor.py
Created April 14, 2016 16:31
Prints all values from one subkey of a json file of a specific format if it includes a particular substring (used e.g. for extracting values from a json manifest)
__author__ = 'ptrourke'
import json
"""
Print value from one subkey `key2` in a json file of the structure below
if it includes a substring `filter_string`
'key': {
'key2': ['value1sstring', 'value2', 'value3sstring'],
# [...]
}
@ptrourke
ptrourke / test_regexes.py
Created November 6, 2015 18:01
Simple script for running tests of regular expression patterns against a list of input strings.
__author__ = 'ptrourke'
import re
'''
A simple script for running tests of regular expressions (regexes) against a list of input strings.
To use, change the values of test_strings, test_patterns, and group_indices .
'''
# The strings to be used as test vectors to test the regexes
test_strings = [

�### Keybase proof

I hereby claim:

  • I am ptrourke on github.
  • I am ptrourke (https://keybase.io/ptrourke) on keybase.
  • I have a public key whose fingerprint is DA98 F98E 1722 0F16 CBE7 0F7A 9ED3 DCD5 7931 2FC6

To claim this, I am signing this object: