Skip to content

Instantly share code, notes, and snippets.

@kwharrigan
kwharrigan / adduser.sh
Created October 16, 2009 14:59
openssl utility script for adding users
#!/bin/bash
EXPECTED_ARGS=2
if [ $# -ne $EXPECTED_ARGS ]
then
echo $'Usage: \n\tadduser <name> <CA>'
echo $'\tWhere <name>.csr, <name>.pem, and <name>.key exist\n'
exit 0
else
@kwharrigan
kwharrigan / C3D.i
Created February 15, 2010 15:17
Swig script for C3D and related makefile
%module C3D
%{
/* Includes the header in the wrapper code */
#include "C3D.h"
#include "vl/vld.h"
%}
/* Parse the header file to generate wrappers */
@kwharrigan
kwharrigan / requirementtable.xsl
Created May 28, 2010 19:08
Topcased Requirements Table XSLT
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*******************************************************************************
* Copyright (c) 2009 RealTime-at-Work.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
@kwharrigan
kwharrigan / process_manifest.sh
Created June 1, 2010 21:38
Process Innosetup Manifest File
#!/bin/sh
EXPECTED_ARGS=1
B2F='gsub(/\\/, "/")'
OUT='("basename \"" $2 "\"") | getline filename ; printf("%s %s %s %s\n", $1, filename, $3, $5)'
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: process_manifest.sh <filename>"
exit 1
@kwharrigan
kwharrigan / cmanage.py
Created June 17, 2010 04:21
Manage Kindle 2.5 collections.json file
#!/usr/bin/env python
import optparse
import simplejson as json
import time
LONGNAME = "%s@en-US"
def load_file(filename):
'''
Load a json file and return the resulting object
syntax on
set tabstop=4
set textwidth=80
set laststatus=2
set statusline=%F%m%r%h%w\ [FMT=%{&ff}]\ [TYPE=%Y]\ [ASC=\%03.3b]\[HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
augroup filetype
au! BufRead,BufNewFile *.proto setfiletype proto
augroup end
augroup filetype
au! BufRead,BufNewFile *.ADA setfiletype ada
@kwharrigan
kwharrigan / 10_6_install
Created September 15, 2010 04:15
ns2 install script for OSX 10.6.4
#! /bin/sh
#
# Copyright (C) 2000 by USC/ISI
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation, advertising
# materials, and other materials related to such distribution and use
# acknowledge that the software was developed by the University of
@kwharrigan
kwharrigan / brew install output (abridged).sh
Created September 18, 2011 19:00
Issue compiling octave on homebrew. "dyld: Symbol not found: _colamd_printf"
la=tsearch.la && \
of=tsearch.oct && \
cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/local/bin/gsed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of && \
touch .tsearch.oct-stamp
la=typecast.la && \
of=typecast.oct && \
cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/local/bin/gsed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of && \
touch .typecast.oct-stamp
@kwharrigan
kwharrigan / output.sh
Created September 20, 2011 06:20
octave compile still broken after 3.2.6 upgrade try.
win10/4.2.1/x86_64/libgfortranbegin.a -lgfortran -lm -framework Accelerate -pthread
rm -f DLD-FUNCTIONS/daspk.oct
la=daspk.la && \
of=daspk.oct && \
cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/local/bin/gsed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of && \
touch .daspk.oct-stamp
rm -f DLD-FUNCTIONS/dasrt.oct
la=dasrt.la && \
of=dasrt.oct && \
@kwharrigan
kwharrigan / configure_output.sh
Created September 20, 2011 07:15
brew install --interactive octave // configure output
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking build system type... x86_64-apple-darwin10.8.0