Skip to content

Instantly share code, notes, and snippets.

Avatar

Micah Elliott MicahElliott

View GitHub Profile
@MicahElliott
MicahElliott / gtasks2tiddly.sed
Created Sep 21, 2010
Convert GTasks semi-automatically into a weekly or monthly status report.
View gtasks2tiddly.sed
#! /bin/sed -f
# Convert GTasks semi-automatically into a weekly or monthly status
# report. This happens to convert into TiddlyWiki format, but it should
# be no harder to do markdown, moin, or mediawiki. This script is more
# about the idea, and some fun showing off how to invoke ‘sed’ from
# shebang, and using ‘xsel’. Tweak as you see fit!
#
# Why bother? Can’t be sure how long your completed tasks will be
# available, so it’s nice to keep a record of your own. Maybe your boss
@MicahElliott
MicahElliott / .Xdefaults
Created Nov 28, 2010
Xterm color scheme
View .Xdefaults
! 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 / c-indent
Created Nov 28, 2010
A personal indentation config for C files, using ‘indent’.
View c-indent
#! /bin/bash
# A personal indentation config for C files, using ‘indent’.
#
# Every project should agree on and share one of these!
#
# Install ‘indent’: apt-get install indent
# See ‘indent(1)’ for the other 100 options to consider.
#
# Backups are funny. Using an explicit file here, since most careful
@MicahElliott
MicahElliott / find-bigdirs
Created Nov 29, 2010
Utilities for finding large or unwanted files/dirs.
View find-bigdirs
#! /bin/bash
# Find big dirs, minimally deep.
# Running in near-silent mode in case want to pipe output.
#
# Author: Micah Elliott <mde MicahElliott com>
#dt=$(date "+%Y%m%d")
#log="bigdirs.$dt.log"
log="$PWD/bigdirs.log"
@MicahElliott
MicahElliott / flac2mp3
Created Nov 29, 2010
FLAC-to-MP3 Mass Converter
View flac2mp3
#! /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 / INSTALL.md
Last active Sep 24, 2015
Show concise system info on any architectrue/distro
View INSTALL.md

Installing to Arch Linux

Installation (packaging) is the main point of this tiny package. I wanted to use a tiny project to serve as an example of how to install directly from github (a gist!) to Arch Linux. Normally a package would go through an approval process to be put into AUR, but until your package is mature enough for that this is a clean and simple way to go.

User flow

@MicahElliott
MicahElliott / dir_colors
Created Nov 29, 2010
Fine-tune your dircolors for unique colorings of any file type.
View dir_colors
# .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 / .gitignore
Created Nov 29, 2010
Python Autotest - Automatically run tests upon detecting writes to source(s).
@MicahElliott
MicahElliott / booklayout.py
Created Nov 29, 2010
Lay out a linearly paged book for bound printing.
View booklayout.py
#! /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 / colortrans.py
Created Nov 29, 2010
Convert values between RGB hex codes and xterm-256 color codes.
View colortrans.py
#! /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