Skip to content

Instantly share code, notes, and snippets.

View GrayHatter's full-sized avatar

GrayHatter

View GitHub Profile
@GrayHatter
GrayHatter / web-servers.md
Created January 8, 2018 07:13 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@GrayHatter
GrayHatter / sound_playback.c
Created July 30, 2017 20:06 — forked from ghedo/sound_playback.c
Simple sound playback using ALSA API and libasound
/*
* Simple sound playback using ALSA API and libasound.
*
* Compile:
* $ cc -o play sound_playback.c -lasound
*
* Usage:
* $ ./play <sample_rate> <channels> <seconds> < <file>
*
* Examples:
@GrayHatter
GrayHatter / open.bash
Created October 6, 2015 01:11 — forked from jrnewell/open.bash
Open Sublime Text in Windows Cygwin
#!/bin/bash
run-fixed-cygpath "/cygdrive/c/Windows" explorer.exe "$@"
exit $?