Skip to content

Instantly share code, notes, and snippets.

@kwharrigan
kwharrigan / excerpt_from_mount.log
Created October 14, 2011 09:40
s3 mount error
2011-10-13 21:47:44.567 [2006] MainThread: [root] Uncaught top-level exception
Traceback (most recent call last):
File "/usr/bin/mount.s3ql", line 9, in <module>
load_entry_point('s3ql==1.4', 'console_scripts', 'mount.s3ql')()
File "/usr/lib/pymodules/python2.6/s3ql/cli/mount.py", line 84, in main
bucket_factory = get_bucket_factory(options)
File "/usr/lib/pymodules/python2.6/s3ql/backends/common.py", line 1144, in get_bucket_factory
bucket = bucket_class(bucket_name, backend_login, backend_pw)
File "/usr/lib/pymodules/python2.6/s3ql/backends/s3.py", line 57, in __init__
self._init()
@kwharrigan
kwharrigan / fix_crlf.sh
Created October 13, 2011 16:04
Example of fixing crlf on a subset of commits using git-filter-branch
#!/bin/bash
all2dos()
{
find * -exec dos2unix {} \;
}
export -f all2dos
git filter-branch -f --tree-filter 'all2dos' HEAD ^master
bash-3.2$ make
Making all in faq
make[1]: Nothing to be done for `all'.
Making all in icons
make[1]: Nothing to be done for `all'.
Making all in interpreter
./config-images.sh ../..
../../doc/interpreter/images.mk is unchanged
../../run-octave -f -q -H ./mk_doc_cache.m doc-cache ../../scripts/DOCSTRINGS ../../src/DOCSTRINGS || { rm -f doc-cache; exit 1; }
dyld: Symbol not found: _amd_calloc
@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
@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 / 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 / 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
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 / 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
@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