Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / SharedPrefsSavable.java
Created January 17, 2015 09:50
SharedPrefsSavable
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
import com.google.gson.Gson;
/** A base class which will allow your class to be Json-serialized to a private SharedPreferences storage.
*/
public class SharedPrefsSavable {
/** True if the object was created from scratch this session */
private transient boolean mIsNew;
@NKjoep
NKjoep / myprompt-bash.sh
Last active September 27, 2016 16:58
My Bash Prompt
# Color Reset
Color_Off="\033[0m" # Text Reset
# Regular Colors
Black="\033[0;30m" # Black
Red="\033[0;31m" # Red
Green="\033[0;32m" # Green
Yellow="\033[0;33m" # Yellow
Blue="\033[0;34m" # Blue
Purple="\033[0;35m" # Purple
@yshrsmz
yshrsmz / Android CI.md
Last active February 16, 2017 07:13 — forked from JvmName/Android CI

#Android and CI and Gradle (A How-To)

There are tech stacks in this world that make it dead simple to integrate a CI build system.
The Android platform is not one of them.

Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming.

But fear not! It can be done!

Before we embark on our journey, you'll need a few things to run locally:

@JvmName
JvmName / Android CI
Created October 28, 2014 23:57
Android CI
#Android and CI and Gradle (A How-To)
There are tech stacks in this world that make it dead simple to integrate a <abbr title="Continuous Integration">CI</abbr> build system. <br>
The Android platform is not one of them.
Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming.
But fear not! It can be done!
Before we embark on our journey, you'll need a few things to run locally:
@mbostock
mbostock / README.md
Last active November 5, 2017 17:51
Infinite Queue

A little demo of an infinitely long-living queue with 6 parallel slots for tasks. The sentinel task that never invokes the callback prevents the queue from ending, even if there are not any currently-active tasks.

There is a downside to this approach, however, which is that the queue’s internal task results array increases in length by one with each task, even though in this case the queue’s results are never triggered. Thus, be careful using this pattern if you really expect the queue to live indefinitely. Alternatively, it might be worth extending Queue’s minimal API to allow tasks to be processed without tracking their return value.

@RichardSlater
RichardSlater / underwater.js
Created October 9, 2012 18:16
Unity3d Underwater Effect
//This script enables underwater effects. Attach to main camera.
//Define variables
var underwaterLevel = 7;
//The scene's default fog settings
private var defaultFog;
private var defaultFogColor;
private var defaultFogDensity;
private var defaultSkybox;
@mbostock
mbostock / .block
Last active June 11, 2018 03:00
Asynchronous Queue
license: gpl-3.0
@dazza5000
dazza5000 / circle.yml
Last active June 23, 2018 15:02
CircleCI Android Configuration Template - circle.yml
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-27-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
@mariotaku
mariotaku / .travis.yml
Last active August 8, 2018 13:10
Sign and upload compiled apk to Github releases automatically using Travis CI
language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-22.0.0