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 | |
"""Convert ogg files to mp3""" | |
from optparse import OptionParser | |
import tempfile | |
import os | |
import subprocess | |
class CommandException(Exception): | |
"""Exception that is raised if calling an external command fails""" | |
def __init__(self, command): |
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/python | |
""" | |
Script to verify that destination is not mising any files from source | |
Usage: exist_check.py <src> <dest> | |
""" | |
import os | |
import sys | |
FILE_TYPES = ['.NEF', '.JPG', '.MTS'] |
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 | |
# | |
# Dump m4a to wav (first step in conversion) | |
mkdir -p output | |
for i in *.mp3 | |
do | |
mplayer -ao pcm:file="output/${i%.mp3}.wav" "$i" | |
done |
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 | |
#Script to convert *.ps files to *.pdf and *.eps files for inclusion in Latex documents | |
ONE=1 | |
FOUND=0 | |
numberEPS=0 | |
numberPDF=0 | |
for file #Traverse all files in directory. | |
do |
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 python3 | |
import os | |
import sys | |
import subprocess | |
commandMap = { | |
# Key(command) => Value(Tuple(list of commands to run, whether to ask for confirmation)) | |
'rebase': (['git', 'svn', 'rebase'], False), | |
'diff': (['git', 'diff'], False), | |
'dcommit': (['git', 'svn', 'dcommit'], False), |
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/perl | |
srand (time()); | |
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))"; | |
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter); | |
my $plaintext = shift; | |
my $crypttext = crypt ($plaintext, $salt); | |
print "${crypttext}\n"; |
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 | |
#Script to convert *.ps files to *.pdf and *.eps files for inclusion in Latex documents | |
ONE=1 | |
FOUND=0 | |
numberEPS=0 | |
numberPDF=0 | |
for file #Traverse all files in directory. | |
do |
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/python | |
""" Script to verify that destination is not mising any files from source """ | |
import os | |
import sys | |
FILE_TYPES = ['.NEF', '.JPG', '.MTS'] | |
def get_all_files(path, filters=()): | |
""" | |
Iterates over all files in path |
OlderNewer