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
void dynarray_ensure_size(size_t num,size_t* pcap,void** buf,size_t szof) | |
{ | |
void* newbuf; | |
size_t newsz; | |
size_t cap = *pcap; | |
if (cap == 0) { | |
if (16 > num) { | |
*pcap = cap = 16; | |
} |
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/bash | |
# This script builds a DEBIAN package. I use it as a replacement for | |
# dpkg-deb because dpkg-deb doesn't follow symlinks. | |
# make 'tar' follow symlinks | |
export TAR_OPTIONS=-h | |
# get a temporary directory | |
TMPDIR="$TEMPDIR" | |
if [ -z $TMPDIR ]; |
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
#!/usr/bin/env python | |
# unpacker.py | |
# Author: Roger Gee <rpg11a@acu.edu> | |
# this script unpacks the lastest commit(s) on master and scans them | |
# for syncing; the script checks a file called '.unpack' which | |
# contains key/value pairs describing how to unpack the repository or | |
# any others into the filesystem; symlink this script as | |
# hooks/post-receive in the bare repository on your remote |
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
#!/usr/bin/env python | |
import re | |
import sys | |
import subprocess | |
# This program reduces dependency lists down to their top-level | |
# dependencies. It works by building a dependency tree obtained by | |
# repeated invocations of 'apt-cache depends'. It was developed for | |
# finding dependency list for Debian package (.deb files) control | |
# files. |
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
/* restrict-command.c - must run as setuid program */ | |
#define _GNU_SOURCE | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <error.h> | |
#include <getopt.h> | |
#include <sys/wait.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
Launch by Roger Gee |
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
Knapsack Implementation | |
by Roger gee | |
24 January 2015 |