Skip to content

Instantly share code, notes, and snippets.

View ultraon's full-sized avatar

Vitalii ultraon

View GitHub Profile
@chrislavender
chrislavender / gist:cad26500c9655627544f
Last active April 19, 2024 15:28
HTTP Live Streaming Tutorial

Note: This is an older post that I did back when I thought I might have time to be a blogger. Oh I was oh so wrong. However, it has proven useful for some folks on stackoverflow. Thus I'm keeping it alive here on Gist.

One of my past projects dealt heavily with an open source Apple technology called HTTP Live Streaming. It’s an HTTP based streaming protocol that at its most fundamental level provides a way to stream video and audio from just about any server with nothing but a few free software tools provided by Apple**. However, it has a few additional features that I think make it a really exciting tool. Yet, I haven’t seen HTTP Live Streaming used very much. This is probably mainly due to the combination of a lack of good/clear documentation, and Apple’s Live Streaming Developer Tools being command line based also make the barrier to entry higher than many developers want to deal with.

The hope is to share my understanding of how to use this technology to:

@johnybot
johnybot / TintableImageView.java
Created March 9, 2015 21:41
TintableImageView
public class TintableImageView extends ImageView {
private ColorStateList tint;
public TintableImageView(Context context) {
super(context);
}
public TintableImageView(Context context, AttributeSet attrs) {
super(context, attrs);
@nisrulz
nisrulz / proguard-rules.pro
Created April 5, 2015 06:14
Android : Proguard Rules for a Library Module
#
# This ProGuard configuration file illustrates how to process a program
# library, such that it remains usable as a library.
# Usage:
# java -jar proguard.jar @library.pro
#
# Save the obfuscation mapping to a file, so we can de-obfuscate any stack
# traces later on. Keep a fixed source file attribute and all line number
# tables to get line numbers in the stack traces.
@daverix
daverix / Testing.java
Last active December 30, 2017 11:38
Dagger2 sub components example
package com.example;
import javax.inject.Scope;
import javax.inject.Singleton;
import dagger.Component;
import dagger.Module;
import dagger.Provides;
import dagger.Subcomponent;
@frogermcs
frogermcs / ActivityScope.java
Last active April 23, 2020 17:14
Sources for blog post "Dependency injection with Dagger 2 - the API"
@Scope
public @interface ActivityScope {
}
@andystanton
andystanton / Start up local Docker Machine on OSX automatically.md
Last active April 3, 2024 00:50
Start up local Docker Machine on OSX automatically.

Notice

This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine to administer the local Docker engine.

Requirements

  • Docker Machine + Docker
  • curl
  • A Virtualbox-driven Docker Machine called "default" docker-machine create --driver virtualbox default (this is the default with Docker toolkit).
@vaughandroid
vaughandroid / ModuleOverride.java
Last active March 11, 2020 20:49
Not quite the easiest way to override Dagger 2 modules for unit tests...
@Component(modules=MyModule.class)
@ApplicationScope
public interface MyComponent {
void inject(MyApplication application);
}
@Module
public class MyModule {
@Provides @ApplicationScope
@gtomek
gtomek / IoUtilsWithOkIo.java
Created February 10, 2016 10:55
Read files with Okio
/**
* Utils for I/O operations.
* <p/>
* Created by Tomek on 09/06/15.
*/
public class IoUtils {
/**
* Reads file and returns a String.
*
@koral--
koral-- / build.gradle
Last active December 12, 2017 01:31
testApt to testAnnotationProcessor migration, workaround for issue: https://code.google.com/p/android/issues/detail?id=224272
android.applicationVariants.all {
def aptOutputDir = new File(buildDir, "generated/source/apt/${it.unitTestVariant.dirName}")
it.unitTestVariant.addJavaSourceFoldersToModel(aptOutputDir)
}