Skip to content

Instantly share code, notes, and snippets.

configurations {
apt
}
dependencies {
compile 'com.squareup.dagger:dagger:1.1.0'
apt 'com.squareup.dagger:dagger-compiler:1.1.0'
}
android.applicationVariants.all { variant ->

Using Dnsmasq with Ubuntu for VM web application testing

When using virtual machines for testing web apps in various browsers (e.g. Internet Explorer), I have found it rather tedious having to continually tweak the hosts file within each new VM for the purpose of adding entries pointing back to the host machine's development web server address.

Instead, the steps below will setup Dnsmasq on a Ubuntu 14.04LTS or 12.04LTS host machine for the purpose of serving both it's own DNS queries and that of virtual machine guests. Dnsmasq will parse your host's /etc/hosts file where we will keep a single set of DNS entires to our test web applications.

Method 1

### Keybase proof
I hereby claim:
* I am boostrack on github.
* I am hflambo (https://keybase.io/hflambo) on keybase.
* I have a public key whose fingerprint is B92D 2343 7A5B 4B80 5687 4CBC A890 28C9 61A7 D5EF
To claim this, I am signing this object:
See my DASH-IF presentation from October, 2014:
https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/
1. encode multiple bitrates with keyframe alignment:
ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \
-g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4
My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment
size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012.

Android Video PLayers

This document is a resume of the players best players / projects / code found found all over the internet for Smooth Video Playback on Android.

ITEC-MediaPlayer

The ITEC MediaPlayer library is a video player library for Android supporting exact seeking to frames, playback speed adjustment, shader support, zooming & panning, frame extraction and a lot of media source protocols and formats, including DASH. It strives to be an API-compatible direct replacement for the Android MediaPlayer and VideoView components and builds upon the Android MediaExtractor and MediaCodec API components. It is very lightweight, easy to use, makes native code / NDK fiddling unnecessary, and works from Android 4.1 up.

  • Source code:

#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
#!/bin/bash
# Check out the blog post at:
#
# http://www.philipotoole.com/influxdb-and-grafana-howto
#
# for full details on how to use this script.
AWS_EC2_HOSTNAME_URL=http://169.254.169.254/latest/meta-data/public-hostname
INFLUXDB_DATABASE=test1
@boostrack
boostrack / README.md
Last active August 29, 2015 14:10 — forked from mmoulton/README.md

Docker stats collection for collectd

This script can be used to feed collectd with cpu and memory usage statistics for running docker containers using the collectd exec plugin.

This script will report the used and cached memory as well as the user and system cpu usage by inspecting the appropriate cgroup stat file for each running container.

Usage

This script is intented to be executed by collectd on a host with running docker containers. To use, simply configure the exec plugin in collectd to execute the collectd-docker.sh script. You may need to adjust the script to match your particulars, such as the mount location for cgroup.

@boostrack
boostrack / monitrc
Created July 28, 2014 18:23 — forked from franck/monitrc
###############################################################################
## Monit control file
###############################################################################
##
## Comments begin with a '#' and extend through the end of the line. Keywords
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
##
## Below you will find examples of some frequently used statements. For
## information about the control file, a complete list of statements and
## options please have a look in the monit manual.