Skip to content

Instantly share code, notes, and snippets.

View MicahElliott's full-sized avatar

Micah Elliott MicahElliott

View GitHub Profile
@MicahElliott
MicahElliott / gtasks2tiddly.sed
Created September 21, 2010 07:20
Convert GTasks semi-automatically into a weekly or monthly status report.
#! /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 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 / c-indent
Created November 28, 2010 07:05
A personal indentation config for C files, using ‘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 November 29, 2010 04:16
Utilities for finding large or unwanted files/dirs.
#! /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 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 / INSTALL.md
Last active September 24, 2015 08:27
Show concise system info on any architectrue/distro

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 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 / .gitignore
Created November 29, 2010 07:14
Python Autotest - Automatically run tests upon detecting writes to source(s).
vids
@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 / 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