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
| /interface pppoe-client | |
| set pppoe-out1 add-default-route=yes | |
| /ipv6 dhcp-client | |
| add interface=pppoe-out1 pool-name=ipv6-pd-pool add-default-route=yes \ | |
| request=prefix pool-prefix-length=56 | |
| /ipv6 address | |
| add from-pool=ipv6-pd-pool interface=bridge advertise=yes |
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 | |
| PARAM=$1 | |
| NEWNAME=${PARAM%.*}.mp4 | |
| # youtube params https://www.virag.si/2015/06/encoding-videos-for-youtube-with-ffmpeg/ | |
| ffmpeg -i "${PARAM}" -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac \ | |
| -strict -2 -b:a 384k -r:a 48000 -movflags faststart "${NEWNAME}" && \ | |
| touch -r "${PARAM}" "${NEWNAME}" && \ | |
| rm -f "${PARAM}" |
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 | |
| # mac battery logger | |
| # stsimb jan 2017 | |
| # allow only one concurrent instance to run | |
| LOCKFILE="/tmp/${SCRIPT_NAME}.lock" | |
| [ -f ${LOCKFILE} ] && logger "$0 already running......" && echo "Already running..." && exit 1 | |
| date > "${LOCKFILE}" | |
| # vars for log function |
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/perl | |
| # stsimb sep 2014 | |
| # webservice to fetch any munin metric via http | |
| # install in muninhost /var/www/cgi-bin and use via apache | |
| # e.g. http://muninhost/cgi-bin/munin-value.cgi?hostname=it-web-04.cloud.forthnet.prv&plugin=cpu&metric=user | |
| use CGI qw(:standard); | |
| my $hostname = lc(param("hostname")); # hostname | |
| my ($host, $dom) = split (/\./, $hostname, 2); # autodetect domain from hostname |