Skip to content

Instantly share code, notes, and snippets.

@keithio
keithio / Step 1: Add ppa and install alsa package
Created August 20, 2011 01:41
Fix HDMI Audio Ubuntu 11.04
$ sudo add-apt-repository ppa:ubuntu-audio-dev/ppa
$ sudo aptitude update
$ sudo aptitude install linux-alsa-driver-modules-$(uname-r)
@keithio
keithio / CSS Code
Created August 20, 2011 19:22
Gist in Tumblr
.gist {
line-height: 1.3em !important;
overflow: auto !important;
}
.gist .gist-file {
border: 0 !important;
}
.gist-data {
$ aplay -D plughw:1,3 /usr/share/sounds/alsa/Front_Center.wav
#load-module module-alsa-sink
load-module module-alsa-sink device=hw:1,7
@keithio
keithio / listdircontents.py
Created August 21, 2011 03:16
Traverse a directory structure and print contents with indentation
'''
Copyright (c) 2011, Keith Hall <http://keith.io>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF U
@keithio
keithio / Alps Touchpad Fix
Created August 21, 2011 06:14
Alps Touchpad Fix
echo "options psmouse proto=imps" | sudo tee -a /etc/modprobe.d/psmouse.conf
sudo modprobe -r psmouse
sudo modprobe psmouse
@keithio
keithio / Install Ubuntu Tweak
Created August 21, 2011 06:16
Install Ubuntu Tweak
$ sudo add-apt-repository ppa:tualatrix/ppa
$ sudo aptitude update
$ sudo aptitude install ubuntu-tweak
@keithio
keithio / ispell for latex
Created August 21, 2011 06:21
ispell for latex
$ ispell -t document.tex
@keithio
keithio / Compile and install netatalk
Created August 24, 2011 00:55
Compile and install netatalk
$ sudo aptitude update
$ mkdir netatalk
$ cd netatalk
$ sudo aptitude install libcrack2-dev libssl-dev
$ apt-get source netatalk
$ sudo apt-get build-dep netatalk
$ cd netatalk-2.1.4
$ sudo DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -us -uc
$ sudo debi
$ echo "netatalk hold" | sudo dpkg --set-selections