Skip to content

Instantly share code, notes, and snippets.

View dsandler's full-sized avatar

Dan Sandler dsandler

View GitHub Profile
@veltman
veltman / README.md
Last active July 6, 2017 14:15
Glitchy globe

Glitching out a <canvas> by converting it to JPEG and trashing some random bytes.

See also: Video glitching

@ericbolo
ericbolo / route-mic-to-headphones.md
Last active February 28, 2023 12:08
Routing mic to audio output for monitoring (ALSA + PulseAudio)
@hrydgard
hrydgard / OpenSLWrap.cpp
Created July 8, 2012 19:48
A minimal implementation of audio streaming using OpenSL in the Android NDK
// Minimal audio streaming using OpenSL.
//
// Loosely based on the Android NDK sample code.
// Hardcoded to 44.1kHz stereo 16-bit audio, because as far as I'm concerned,
// that's the only format that makes any sense.
#include <assert.h>
#include <string.h>
// for native audio
@romannurik
romannurik / button_bar_layout.xml
Created April 10, 2012 04:24
How to make a proper button bar on ICS
<!--
A button bar is a set of buttons at the bottom of an activity.
An example is an AlertDialog with OK/Cancel buttons.
Note that something similar can be accomplished using a
split action bar and text-only action buttons, but this is an
alternate presentation that's often preferred.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"