This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyaudio | |
import wave | |
import subprocess, shlex | |
import os | |
import json | |
import re | |
import urllib | |
CHUNK = 1024 | |
FORMAT = pyaudio.paInt16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set encoding=utf-8 | |
" tab stuff | |
set tabstop=4 " tab = 4 | |
set shiftwidth=4 " indentation width | |
set softtabstop=4 " makes spaces feel like tabs | |
set expandtab " inserts softtabstop number of spaces | |
autocmd FileType make setlocal noexpandtab " make files must use tabs | |
" search stuff | |
set hlsearch " highlight the text matching the search pattern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <sys/stat.h> | |
typedef unsigned char uint8_t; | |
/** | |
* @param src input nv12 raw data array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on http://mikepultz.com/2011/03/accessing-google-speech-api-chrome-11/ | |
# needs pyaudio package <apt-get install python-pyaudio> | |
# sox commands to convert from way to flac format <apt-get install sox> | |
import pyaudio | |
import wave | |
import subprocess, shlex | |
import os | |
CHUNK = 1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# my custom .bashrc scripts | |
# mkcd -- makes life simpler | |
function mkcd() { | |
mkdir $1; | |
cd $1; | |
} | |
## a quick way to get out of current directory ## | |
alias ..="cd .."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for (( i=1; i<=13; i++ )) | |
do | |
mkdir lab_$i 2> /dev/null | |
cd lab_$i | |
for ((j=1; j<=100; j++)) | |
do | |
if test $j -lt 10 | |
then | |
mkdir 1PI09IS00$j |