Well, not so much a quirk - but an interesting anti-pattern I found in some (poor quality) PowerShell. Documenting the "how and why" so I can refer to it again if needed!
- The Kodi databases are all SQLite3 based.
- For Linux, the video database will be located at:
~/.kodi/userdata/Database/MyVideosXX.db
, whereXX
is the version number. You will most likely want the highest number available for edit.
$ sudo apt-get install libsqlite3-dev sqlite3
$ sqlite3 MyVideosXX.db
Python parser class for CloudTrail event archives, previously dumped to an S3 bucket. Class provides an iterator which will:
- Scan a given directory for archive files matching the required pattern.
- Decompress each archive in memory.
- Parse JSON payload and return each event in turn.
Parser contained in cloudtrailparser.py
, with timezone.py
used as a simple datetime.tzinfo
concrete class implement to provide UTC timezone.
Or to put it another way...
Does this certificate I have actually work with this private key I have?
Where server.crt
is your certificate and server.key
is your private key:
$ certMod=$(openssl x509 -text -noout -modulus -in server.crt | grep "Modulus=") && \
keyMod=$(openssl rsa -text -noout -modulus -in server.key | grep "Modulus=") && \
[[ $certMod == $keyMod ]] && echo "Equal"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from datetime import datetime | |
import timezone | |
def main(): | |
my_time = datetime( | |
year = 2016, | |
month = 1, |
A function compare_json_data(source_data_a,source_data_b)
, accepting structures populated with data loaded from json.load()
and comparing for equality.
$ ./compare.py
Compare JSON result is: True
The current PHP ssh2 extension via PECL won't compile under PHP7.
Using a more recent version via PHP's GitHub we can make this work.
$ sudo apt-get install autoconf libssh2-1-dev
$ curl -LO https://github.com/php/pecl-networking-ssh2/archive/master.zip
$ unzip master.zip
$ cd pecl-networking-ssh2-master