The Blog of Tom Webster

Chronic Ranter, Reviewer, and Developer. I speak only for myself, opinions are my own.

Garbled Sounds in Audacity - Debian Testing (jessie)

  2013-11-25 09:47:00 PST

While trying to record some lines for inSecurity, I ran into a fairly annoying bug with Audacity on my home system. I recorded some sound, and it did record properly, but when I tried to play it back, all I heard was garbled audio for a split second. After a long time Googling for the answer, I stumbled upon this launchpad bug report, which details a workaround at the bottom. I took this information and made an alias entry in my .bashrc file:

alias audacity='PULSE_LATENCY_MSEC=30; export PULSE_LATENCY_MSEC; /usr/bin/audacity'

I could hear the audio properly when I relaunched audacity, much to my happiness.

Get List of Users from Active Directory Group

  2013-10-24 06:10:00 PDT

If you've ever needed to export a list of users from an Active Directory group, you've probably discovered that it isn't entirely straight forward. The secret to generating and exporting a list are a few command line tools, dsquery and dsget. Below, you'll see an example of a group export. The output is fixed-width, so use Excel to break up the data into a managable format.

You'll only need to change CN=Group Name,OU=Groups,DC=Example,DC=com to fit your domain and group. If you'd like to control what fields are exported from dsget, check out this list of parameters for dsget on technet.

dsquery group "CN=Group Name,OU=Groups,DC=Example,DC=com" | dsget group -members | dsget user -ln -fn -samid -email > C:\Users\username\Desktop\file.csv

New Talk and a New Talk Page

  2013-10-11 07:34:00 PDT

I'm happy to announce that I've finished creating my talks page! Over there you can find various presentations that I've given at conferences and forums, along with podcast appearances (still building that out). My latest talk is Making Security Shiny, so go check that out.

Git Branch in Bash Prompt

  2013-07-22 11:02:00 PDT

If you've wanted to see your current branch in Bash, check out this easy .bashrc addition from henrik. Just add the code to the bottom of your .bashrc file and source ~/.bashrc to add the changes.

# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
#   username@Machine ~/dev/dir[master]$   # clean working directory
#   username@Machine ~/dev/dir[master*]$  # dirty working directory

function parse_git_dirty {
  [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '

Virtual Web Server: Part 9 - Git Setup

  2013-05-11 12:08:00 PDT

In order to get OctoPress up and running in this tutorial series, you'll need Git installed and configured. Luckily, this is quick and easy.

First, install git and git-core, chances are, if you've followed this tutorial in order, you probably have these installed already.

Next, We need to tell git who we are with git config --global user.name "FirstName LastName" and what our email address is with git config --global user.email "address@example.com"

With this done, you can create and manage git repositories, very important for our OctoPress install later.

Other posts in this series:

  1. Getting a Server
  2. Getting a Domain Name
  3. Automatic Updates
  4. Apache2 Setup
  5. PHP and MySQL Setup
  6. ProFTPd Setup
  7. WordPress Setup
  8. RVM Setup
  9. Git Setup - You are here
  10. OctoPress Setup
  11. Rackspace Backups
Page: 12 of 31