Skip to content

Instantly share code, notes, and snippets.

View jbert's full-sized avatar

John Berthels jbert

View GitHub Profile
### Keybase proof
I hereby claim:
* I am jbert on github.
* I am jbert (https://keybase.io/jbert) on keybase.
* I have a public key ASA_ssvcVxA4Yk0wBhSaZBDjYwGpz5wFYMofTo3WNyVszgo
To claim this, I am signing this object:
################################################
# Returns "*" if the current git branch is dirty.
function parse_git_dirty {
[[ $(/usr/bin/git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
}
# Returns "|s:N" where N is the number of stashed states (if any).
function parse_git_stash {
local stash=`expr $(/usr/bin/git stash list 2>/dev/null| wc -l)`
if [ "$stash" != "0" ]
.==-. .-==.
\()8`-._ `. .' _.-'8()/
(88" ::. \./ .:: "88)
\_.'`-::::.(#).::::-'`._/
`._... .q(_)p. ..._.'
""-..-'|=|`-..-""
.""' .'|=|`. `"".
,':8(o)./|=|\.(o)8:`.
(O :8 ::/ \_/ \:: 8: O)
\O `::/ \::' O/
// Run runs the pipeline stage.
func (ai *AlsaIn) Run() {
c, err := alsa.NewCaptureDevice(ai.deviceName, ai.numChannels, ai.format, ai.rate)
if err != nil {
ai.Fatalf("Error opening ALSA input %s: %s", ai.deviceName, err.Error())
}
var lastChunkEnd time.Time
ReadLoop:
for {