This file contains 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 <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <stdarg.h> | |
#include <string.h> | |
#include <libgen.h> | |
#include <unistd.h> | |
#include <stdlib.h> |
This file contains 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 | |
# | |
# mkshar: make a shar file | |
# | |
usage() { | |
echo "usage: $0 [--rc file] payload [...]" 1>&2 | |
exit 1 | |
} |
This file contains 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
/* Q&D md5sum clone that uses Solar Designer's md5 implementation */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include "md5.h" |
This file contains 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 <string.h> | |
actualspace(register c) | |
{ | |
return (c=='\r') || (c=='\n') || isspace(c); | |
} | |
int |
This file contains 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 <unistd.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <libgen.h> | |
#include <time.h> | |
main(argc, argv) | |
char **argv; |
This file contains 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/ksh | |
# | |
extractomatic() { | |
tarball=$1 | |
first_in_archive=`tar tzf $tarball | head -1` | |
path=`dirname ${first_in_archive}/thing` | |
when=`dateof $tarball` | |
export GIT_COMMITTER_DATE="$when" |
This file contains 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 <unistd.h> | |
main(argc, argv) | |
char **argv; | |
{ | |
/* to get around the goddamn macos privilege protection racket */ | |
execv("/usr/bin/cu", argv); | |
perror("cu"); | |
} |
This file contains 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
/* | |
* partial implementation of termlib's tgoto() function, with | |
* the optimization of caching compiled strings so they don't | |
* need to be recompiled evey time tgoto is called. | |
* | |
* "partial implementation" because I've got yet implemented %<xy | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains 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 | |
# | |
# Find functions that are defined but not referenced in a body of C code | |
test -f tags || ctags -M *.c | |
test -f tags || exit 1 | |
FILES=`awk -F' ' '{print $2}' < tags | sort |uniq` |
This file contains 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 | |
HOSTS="tinyd gateway gehenna credit downbelow netbsd" | |
if [ ! "$1" ]; then | |
echo "usage: $0 {cmd}" 1>&2 | |
exit 1 | |
fi | |
cmd=$1 |
OlderNewer