Skip to content

Instantly share code, notes, and snippets.

View MicahElliott's full-sized avatar

Micah Elliott MicahElliott

View GitHub Profile
@MicahElliott
MicahElliott / about.rb
Created November 29, 2010 19:56
A still-concise extension of the standard ‘file’ info.
#! /usr/bin/env ruby
# about — A still-concise extension of the standard ‘file’ info.
#
# Author: Micah Elliott http://MicahElliott.com
# License: WTFPL http://sam.zoy.org/wtfpl/
#
# Combine standard file utils (eg, file, wc, head, tail, sort, stat) to
# give pieces of information about a file. Informs about file length,
# sorted-ness, and other meta-data.
@MicahElliott
MicahElliott / youtube2mp3.py
Created November 29, 2010 19:22
Download and Convert youtube "favorite" videos to MP3.
#! /usr/bin/env python
""" youtube2mp3 - Download and Convert youtube "favorite" videos to MP3.
Determine "favorited" vids, download them as FLVs, extract/ save its
MP3, meanwhile fixing up file names.
Assumes most (or all) of the things you "favorite" on Youtube are some
sort of musical recording. I've found a lot of old jazz tunes on Youtube
that I can't otherwise find recordings for. Down side is that the
@MicahElliott
MicahElliott / adobe.vim
Created November 29, 2010 18:48
Vim “Adobe” colorscheme
" Vim “Adobe” colorscheme
"
" Maintainer: Micah Elliott <mde AT MicahElliott DOT com>
" Version: 0.3
" Info: Adobe theme, easy on eyes.
"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Philosophy: See my blog article:
" http://micahelliott.com/2008/12/editor-color-scheme-philosophy
"
@MicahElliott
MicahElliott / balance-dark.png
Created November 29, 2010 17:55
Zsh spanning bar prompt with “balanced” sides.
balance-dark.png
@MicahElliott
MicahElliott / geodist.py
Created November 29, 2010 08:35
Use gmaps to parse and calculate distance between two points.
#! /usr/bin/env python
""" Use gmaps to parse and calculate distance between two points.
"""
__author__ = 'Micah Elliott http://MicahElliott.com'
__version__ = '0.1'
### -------------------------------------------------------------------
@MicahElliott
MicahElliott / fnfix.py
Created November 29, 2010 08:27
Fix ugly file names to be UNIX shell-friendly.
#! /usr/bin/env python
"""Fix ugly file names to be UNIX shell-friendly.
PROBLEM
=======
You have files named with funky characters lying around in your
filesystem. Ugly files like "My Document #3 - (2005)[1].txt" are
common when you're sharing directories with Windows users, but you
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@MicahElliott
MicahElliott / booklayout.py
Created November 29, 2010 07:38
Lay out a linearly paged book for bound printing.
#! /usr/bin/env python
""" Lay out a linearly paged book for bound printing.
Described in this post:
http://micahelliott.com/2008/12/from-e-book-to-real-book/
Additions to post:
* Firefox does not support the layout, so need to generate PDF.
* Dad laughs at my process.
@MicahElliott
MicahElliott / .gitignore
Created November 29, 2010 07:14
Python Autotest - Automatically run tests upon detecting writes to source(s).
vids
@MicahElliott
MicahElliott / dir_colors
Created November 29, 2010 06:18
Fine-tune your dircolors for unique colorings of any file type.
# .dircolors
#
# Configure your console file colors.
#
# Author: Micah Elliott http://MicahElliott.com
#
# This file should sit in your $HOME as .dircolors or .dir_colors,
# depending on your distro.
#
# Configuration file for dircolors, a utility to help you set the