summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-06-13 11:23:47 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-06-13 11:23:47 +0200
commit3164f655ed86a033570ed89e86b7fd7058b69ced (patch)
tree81646d0ba12ddc54382db8a6fdd72c5826bf9ef3
parent2de1f9dbfc3e4c9da5cf54a771149d81932c6538 (diff)
downloadbin-3164f655ed86a033570ed89e86b7fd7058b69ced.tar.gz
bin-3164f655ed86a033570ed89e86b7fd7058b69ced.tar.xz
misc
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xcpanp4
-rwxr-xr-xmimetype.php18
-rwxr-xr-xping-ts4
3 files changed, 26 insertions, 0 deletions
diff --git a/cpanp b/cpanp
new file mode 100755
index 0000000..a575ef5
--- /dev/null
+++ b/cpanp
@@ -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]));
diff --git a/ping-ts b/ping-ts
new file mode 100755
index 0000000..b47f722
--- /dev/null
+++ b/ping-ts
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+ping "$@" | ts
+