Skip to content

Instantly share code, notes, and snippets.

View MicahElliott's full-sized avatar

Micah Elliott MicahElliott

View GitHub Profile
@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 / demo.txt
Created January 13, 2012 22:10
Display all the possible toilet fonts for a string.
banner
### ###
# # # # # ###### ## #### #### # # ###
# # # # # # # # # # # # # ###
# # # #### ##### # # #### # # # #
# # # # # # ###### # # # #
# # # # # # # # # # # # # # ###
### ###### # # # ###### # # #### #### # # ###
@MicahElliott
MicahElliott / .Xdefaults
Created November 28, 2010 03:53
Xterm color scheme
! xterm color scheme — Make all 16 beautiful.
!
! Suited for black background, but includes disabled alternative light scheme.
!
! Open this file with gvim to enable <Leader><F2> color mode.
!
! Use `xfontsel`, `xlsfonts`, and `fc-list` to find other fonts.
!
! On Ubuntu I have to name this file ‘~/.Xdefaults-$(hostname)’
!
@MicahElliott
MicahElliott / rbenv-howto.md
Created April 17, 2012 18:11
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@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
@MicahElliott
MicahElliott / flac2mp3
Created November 29, 2010 04:56
FLAC-to-MP3 Mass Converter
#! /bin/bash
#
# flac2mp3 — Convert FLAC files to MP3.
#
# Author: Micah Elliott <mde MicahElliott com>
# Date: Feb 2008 (not sure if any util has obviated this)
#
# Many people store their music collections in FLAC format these days
# since it’s nice to have lossless compressed copies, and disks are
# cheap. But people also need to convert their FLAC collections into
@MicahElliott
MicahElliott / zbell-long-cmd.zsh
Last active December 22, 2021 23:41
Sound a bell when long-running commands complete
# Original: https://gist.github.com/oknowton/8346801
# Add to zplug:
# zplug MicahElliott/97df9ca799e49c0fcc0a981bf021f813, from:gist, as:plugin, use:zbell-long-cmd.zsh
# brew install terminal-notifier
# only do this if we're in an interactive shell
[[ -o interactive ]] || return
@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 / .gitignore
Created November 29, 2010 07:14
Python Autotest - Automatically run tests upon detecting writes to source(s).
vids
@MicahElliott
MicahElliott / REAMDE.md
Last active November 26, 2019 00:41
Generated User Names by Color

Generated User Names by Color

Good for: demo purposes or seeding a small group of assignable user names/avatars.

I came across a need for a set of neutral generated user names. Pulling them out of a gender-neutral name dictionary was pretty lame. I also wanted some form of distinguishable avatar. This led to looking at a list of web-friendly color names.