Skip to content

Instantly share code, notes, and snippets.

View lukeorland's full-sized avatar

Luke Orland lukeorland

View GitHub Profile
We couldn’t find that file to show.
#!/bin/bash
declare -r PI=3.14159265358979
if ['id -u' != "0" ]; then
echo "You should be root to run this script."
exit 1
fi
clear
echo "What is your race distance in meters?"
read -e RACE_DISTANCE
echo "What is your roller diameter in inches?"
@lukeorland
lukeorland / brew install -vd sshfs-fuse ---- config.log
Created December 10, 2010 18:28
brew install -vd sshfs-fuse ---- config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sshfs-fuse configure 2.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/sshfs-fuse/2.2
## --------- ##
## Platform. ##
@lukeorland
lukeorland / gist:963551
Created May 9, 2011 22:20
brew install imagemagick fail 1
/usr/local/bin/git
==> Cloning git://github.com/adamv/ImageMagick.git
Updating /Users/orluke/Library/Caches/Homebrew/imagemagick--git
git fetch git://github.com/adamv/ImageMagick.git
git fetch --tags
==> Checking out tag 6.6.9-4
git checkout 6.6.9-4
git checkout-index -a -f --prefix=/private/tmp/homebrew-imagemagick-6.6.9-4-NHrh/
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.6.9-4 --disable-dependency-tracking --enable-shared --disable-static --with-modules --without-gslib --without-magick-plus-plus
./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.6.9-4 --disable-dependency-tracking --enable-shared --disable-static --with-modules --without-gslib --without-magick-plus-plus
@lukeorland
lukeorland / gist:964455
Created May 10, 2011 13:20
ls -C1 /usr/local/lib/pkgconfig
$ ls -C1 /usr/local/lib/pkgconfig
ImageMagick.pc@
MagickCore.pc@
MagickWand.pc@
QtCLucene.pc
QtCore.pc
QtDeclarative.pc
QtDesigner.pc
QtDesignerComponents.pc
QtGui.pc
@lukeorland
lukeorland / gist:1273312
Created October 9, 2011 04:46
vim-pandoc git commit error
$ git commit
Error detected while processing /Users/orluke/src/newnew_dotvim/.vim/bundle/vim-pandoc/plugin/pandoc.vim:
line 1:
E319: Sorry, the command is not available in this version: python<<EOF
line 2:
E488: Trailing characters: # We register openers with PandocRegisterExecutor.
line 3:
E488: Trailing characters: # We take its first argument as the name of a vim ex command, the second
line 4:
E488: Trailing characters: # argument as a mapping, and the rest as the description of a command,
@lukeorland
lukeorland / handbrake_cli_dvd2m4v.sh
Created November 16, 2011 22:46
bash script for using HandBrakeCLI to rip a DVD on a Mac and compress it to H.264 m4v. requires a specific version of the HandBrakeCLI dmg in a specific location.
#!/usr/bin/env bash
set -x
HANDBRAKECLI_DMG="/Volumes/CLSP-500GB/handbrakeCLI/HandBrake-0.9.5-MacOSX.5_CLI_x86_64.dmg"
HANDBRAKECLI="/Volumes/HandBrake-0.9.5-MacOSX.5_CLI_x86_64/HandBrakeCLI"
open $HANDBRAKECLI_DMG
sleep 4s
DVD="$1"
DEST="$2"
@lukeorland
lukeorland / mediasite_slides_movie.py
Last active September 29, 2015 13:38
Mediasite content version to standalone videos
#!/usr/bin/env python
# Convert Mediasite content for a lecture into two DV-formatted videos:
# one from the lecture
# one of the slideshow with timings extracted from the Mediasite content.
#
# Usage: run this Python script from the root directory of the Mediasite
# content.
# It's the directory that contains the directories and files as follows:
# App_Themes/ Content/ Player.html PlayerOptions/ Players/
@lukeorland
lukeorland / combined_size.py
Created January 24, 2012 23:11
Prints the combined MB of the files passed as arguments
#!/usr/bin/env python
from __future__ import print_function
import argparse
import os
def file_size(file_name):
"""Returns size of the file named file_name in bytes."""
if not os.path.exists(file_name):
msg = "The file {} does not exist.".format(file_name)
@lukeorland
lukeorland / gigaword-separate-sentences.py
Created April 27, 2012 19:02
filter out SGML tags from gigaword files and print out headlines and text from story- and mult-type DOCs, one sentence per line
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Luke Orland
# [email protected]
# Fri Apr 27 14:51:01 EDT 2012
# EXAMPLE USAGE:
# $ zcat gigaword/data/*/*gz | python gigaword-separate-sentences.py > text