Skip to content

Instantly share code, notes, and snippets.

View ehough's full-sized avatar

Eric Hough ehough

View GitHub Profile
@ehough
ehough / check.php
Last active October 7, 2015 12:57
Requirements check for TubePress
<?php
/**
* Copyright (c) 2012 - 2015 Eric Hough (eric@tubepress.com)
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
@ehough
ehough / mp3-copier
Created August 27, 2014 21:03
mp3 copier for head unit
dest_base="destination"
src_dir="src/"
atfile=0
atdir=0
for file in $src_dir/*; do
if ((atfile == 0)); then
dest_dir=$(printf "$dest_base/%0.5d" $atdir)
[[ -d $dest_dir ]] || mkdir -p $dest_dir
fi