diff options
-rwxr-xr-x | cpanp | 4 | ||||
-rwxr-xr-x | mimetype.php | 18 | ||||
-rwxr-xr-x | ping-ts | 4 |
3 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,4 @@ +#!/bin/bash + +unset PERL_MB_OPT PERL_MM_OPT +exec /usr/bin/vendor_perl/cpanp "$@" diff --git a/mimetype.php b/mimetype.php new file mode 100755 index 0000000..1134a13 --- /dev/null +++ b/mimetype.php @@ -0,0 +1,18 @@ +#!/usr/bin/php +<?php + +// Return mimetype of file +function mimetype($file) { + $fileinfo = new finfo(FILEINFO_MIME_TYPE); + + // XXX: Workaround for PHP#71434 https://bugs.php.net/bug.php?id=71434 + $old = error_reporting(); + error_reporting($old &~ E_NOTICE); + $mimetype = $fileinfo->file($file); + error_reporting($old); + + return $mimetype; +} + +printf("%s\n", mimetype($argv[1])); +printf("%s\n", mime_content_type($argv[1])); @@ -0,0 +1,4 @@ +#!/bin/bash + +ping "$@" | ts + |