Skip to content

Instantly share code, notes, and snippets.

View MicahElliott's full-sized avatar

Micah Elliott MicahElliott

View GitHub Profile
@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 / 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 / balance-dark.png
Created November 29, 2010 17:55
Zsh spanning bar prompt with “balanced” sides.
balance-dark.png
@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 / 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 / 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 / syntax-python.vim.patch
Created December 9, 2010 18:37
Patch to add special comments support to v3.0.6 for vim python syntax.
--- py3-orig.vim 2010-12-09 09:46:45.311794900 -0800
+++ py3.vim 2010-12-09 10:35:17.895552660 -0800
@@ -137,7 +137,21 @@
syn match pythonComment "#.*$" display contains=pythonTodo,@Spell
syn match pythonRun "\%^#!.*$"
syn match pythonCoding "\%^.*\%(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$"
-syn keyword pythonTodo TODO FIXME XXX contained
+
+" Special non-standard comment types, to rainbow-ify your code.
+syn match pythonCommentedCode "##\w.*$" display
@MicahElliott
MicahElliott / python.vim
Created December 10, 2010 06:03
Add special comments support to v3.0.6 for vim python syntax.
" Vim syntax file
" Language: Python
" Maintainer: Dmitry Vasiliev <dima@hlabs.spb.ru>
" URL: http://www.hlabs.spb.ru/vim/python3.0.vim
" Last Change: 2010-11-14
" Filenames: *.py
" Version: 3.0.6
"
" Based on python.vim (from Vim 6.1 distribution)
" by Neil Schemenauer <nas@python.ca>
@MicahElliott
MicahElliott / pysel.zsh
Created December 15, 2010 08:42
Python (Version) Selector (and Activator)
# Zsh (to be ‘source’d)
# Python (Version) Selector (and Activator)
#
# Prompts user with a menu of installed Pythons with their version
# string and path. Their choice results in an alias that hides any
# invocation of ‘python’.
#
# Potentially useful for setups with multiple ‘pip’s,
# ‘virtualenv[wrapper]’s, etc.
@MicahElliott
MicahElliott / vimpress.mkd
Created December 21, 2010 04:43
Plain Presentations in Plain Text (PPPT)

Presentations in Plain Text (PPT++)

With some help from Markdown and Vim.

“Hope this makes you chuckle.” —Micah Elliott