Skip to content

Instantly share code, notes, and snippets.

View Jonathan727's full-sized avatar

Jonathan Jonathan727

  • Minnesota, United States
View GitHub Profile
@Jonathan727
Jonathan727 / parseml.py
Last active September 30, 2022 19:36 — forked from urschrei/parseml.py
Extract attachments from EML files in the current dir, and write them to the output subdir
#!/usr/bin/env python
"""
2022 update:
- recurse attached eml files
2020 update:
- More iterators, fewer lists
- Python 3 compatible
- Processes files in parallel
(one thread per CPU, but that's not really how it works)
@Jonathan727
Jonathan727 / UDF_VALIDATE_VIN.sql
Last active January 25, 2022 15:25 — forked from dvysotskiy/UDF_VALIDATE_VIN.sql
SQL Server function to validate vehicle identification numbers (VIN) using length, format, and checksum rules.
CREATE FUNCTION [dbo].[UDF_VALIDATE_VIN](
@VIN varchar(MAX)
)
RETURNS @RESULT TABLE
(
IS_VALID BIT NOT NULL,
LENGTH_VALID BIT NOT NULL,
FORMAT_VALID BIT NOT NULL,
CHECKSUM_VALID BIT NOT NULL,
CHECK_DIGIT CHAR(1) NULL,