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
#!/bin/bash | |
function jwt_decode(){ | |
jq -R 'split(".") | .[1] | @base64d | fromjson' <<< "$1" | |
} | |
function remove_quotes(){ | |
sed -e 's/^"//' -e 's/"$//' <<<"$1" | |
} |
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
<?php | |
/** | |
* Front-end upload form example | |
* using ProcessWire Inputfields | |
*/ | |
$sent = false; | |
$upload_path = $config->paths->assets . "files/.tmp_uploads/"; |
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
:940: | |
:20:940S150202 | |
:25:NL68RABO0123456789 EUR | |
:28C:0 | |
:60F:C150130EUR000000005442,89 | |
:62F:C150202EUR000000005442,89 | |
:20:940S150203 | |
:25:NL68RABO0123456789 EUR | |
:28C:0 | |
:60F:C150202EUR000000005442,89 |
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
# @brief | |
# Performs file upload validation for django. The original version implemented | |
# by dokterbob had some problems with determining the correct mimetype and | |
# determining the size of the file uploaded (at least within my Django application | |
# that is). | |
# Use it in your models like this; | |
# validate_file = FileValidator(max_size=24*1024*1024, | |
# allowed_mimetypes=('text/plain',)) | |
# file = models.FileField(upload_to='path_below_media/%Y/%m/%d', validators=[validate_file]) |