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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define _GNU_SOURCE | |
| #include <getopt.h> | |
| #define DEFAULT_LINES 5 | |
| static long get_nline(FILE *f); | |
| static void do_tail(FILE *f, long nlines, long show_lines); |
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/sh | |
| set -e | |
| TIFF_FILE=$1 | |
| TO_ADDRESS=${2:-root} | |
| CALLERID=${3:-anonymous} | |
| FROM_ADDRESS="[email protected]" | |
| if [ -f $TIFF_FILE ]; then | |
| tiff2pdf $TIFF_FILE | uuencode fax.pdf | mailx -s "FAX from ${CALLERID}" $TO_ADDRESS |
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
| echo $((`date +%j`-`date -v-2w -v-sun +%j`)) |
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/sh | |
| _DEBUG=0 | |
| function DEBUG() | |
| { | |
| if [ "$_DEBUG" -eq 1 ]; then | |
| echo $@ | |
| else | |
| eval $@ |
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
| gdate -d 'sunday 2 weeks ago' | |
| date -v-1w -v-sun |
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
| head -c 200 /dev/urandom | md5sum | sed -r 's/^(.{12}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;' |
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/sh | |
| wget --post-data="UPDATE_BUTTON=1" -O - http://ID:PASSWORD@IPADDR/index.cgi/reboot_main_set |
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/sh | |
| curl -d "UPDATE_BUTTON=1" http://ID:PASSWORD@IP_ADDRESS/index.cgi/reboot_main_set |
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
| if command -v lv > /dev/null; then export GIT_PAGER='lv -Ou8 -c'; fi |
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/sh | |
| trashdir=.recycle | |
| rootdir=/var/lib/samba/shares | |
| olddays=14 | |
| cd ${rootdir} | |
| for targetdir in *; do | |
| if [ -d ${targetdir}/${trashdir} ]; then |