Skip to content

Instantly share code, notes, and snippets.

View kimmellj's full-sized avatar

James Kimmell kimmellj

View GitHub Profile
@intel352
intel352 / apache.sh
Last active December 22, 2015 14:44
Handy one-liners
# List name vhosts on current server (excludes aliases)
sudo apache2ctl -S 2>&1 | grep -v 'Syntax OK' | grep 'namevhost' | tr -s ' ' | cut -d' ' -f5
# List all vhosts and aliases on current server
THECONFS="`apache2ctl -S 2>&1 | grep -oE '\/[^\:]+' | grep -vE '^\s*#'`"; for ACONF in ${THECONFS}; do cat ${ACONF} | tr '\t' ' ' | grep -E '^ *(ServerName|ServerAlias)' | sed -r 's/^( |ServerName|ServerAlias)+//g' | tr ' ' '\n'; done | sort -fu
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English