Skip to content

Instantly share code, notes, and snippets.

@Ronelg
Ronelg / gstreamer_cerbero_android.md
Created December 28, 2018 21:45 — forked from wonchulee/gstreamer_cerbero_android.md
how to build GStreamer cerbero for Android

How to build GStreamer cerbero for Android

###Clone and build cerbero

clone cerbero from gstreamer, not sdk/gstreamer

git clone git://anongit.freedesktop.org/gstreamer/cerbero

build cerbero for getting gstreamer-1.0-android-armv7-<version>.zip

@Ronelg
Ronelg / Node_AWS_Linux.md
Created January 11, 2018 20:29 — forked from nrollr/Node_AWS_Linux.md
Install Node.js on Amazon Linux (EC2)

Installing Node.js on Amazon Linux AMI

The following will guide you through the process of installing Node.js on an AWS EC2 instance running Amazon Linux AMI 2016.09 - Release Notes

For this process I'll be using a t2.micro EC2 instance running Amazon Linux AMI (ami-d41d58a7). Once the EC2 instance is up-and-running, connect to your server via ssh

@Ronelg
Ronelg / rxjs_operators_by_example.md
Created September 24, 2016 20:01 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
# SYNTAX:
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches)
var pattern = /pattern/attributes; # same as above
# BRACKETS:
[...]: Any one character between the brackets.
[^...]: Any one character not between the brackets.
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Ronelg
Ronelg / AppLifeCycle.java
Created January 30, 2016 09:17
Android application foreground or bakcground
/**
* Check if the application is in the foreground or background.
* *
* Register this callbacks for an application
* Application application = (Application) context.getApplicationContext();
* application.registerActivityLifecycleCallbacks(new BaseLifeCycleCallbacks());
* *
* Note: These callbacks can be registered at any level of the application lifecycle.
* Previous methods to get the application lifecycle forced the lifecycle callbacks to be registered
@Ronelg
Ronelg / DividerItemDecoration.java
Created January 19, 2016 19:23 — forked from alexfu/DividerItemDecoration.java
An ItemDecoration that draws dividers between items. Pulled from Android support demos.
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Ronelg
Ronelg / Readme.md
Created January 17, 2016 14:59 — forked from gabrielemariotti/Readme.md
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example:

/**
* Copyright (c) 2013 Xcellent Creations, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions: