$ uname -r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.github.jengelman.gradle.plugins.shadow.ShadowApplicationPlugin | |
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | |
import com.jfrog.bintray.gradle.BintrayPlugin | |
import org.jetbrains.kotlin.gradle.dsl.Coroutines | |
import org.gradle.api.publish.maven.MavenPom | |
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper | |
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
import com.jfrog.bintray.gradle.BintrayExtension | |
val kotlinVersion = plugins.getPlugin(KotlinPluginWrapper::class.java).kotlinPluginVersion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#this is a small script which updates Android SDK from command line. | |
#Needs to be executed from Android SDK root | |
( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | tools/bin/sdkmanager \ | |
"tools" \ | |
"platform-tools" \ | |
"platforms;android-25" \ | |
"build-tools;25.0.1" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.animation.TypeEvaluator; | |
import android.animation.ValueAnimator; | |
import static java.lang.Math.pow; | |
public class GammaEvaluator implements TypeEvaluator { | |
private static final GammaEvaluator instance = new GammaEvaluator(); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ColorFilter duotoneColorFilter(@ColorInt int colorBlack, @ColorInt int colorWhite, float contrast) { | |
ColorMatrix cm = new ColorMatrix(); | |
ColorMatrix cmBlackWhite = new ColorMatrix(); | |
float lumR = 0.2125f; | |
float lumG = 0.7154f; | |
float lumB = 0.0721f; | |
float[] blackWhiteArray = new float[]{ | |
lumR, lumG, lumB, 0, 0, | |
lumR, lumG, lumB, 0, 0, |
-
Add Add RethinkDB key
source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
-
Install packages
sudo apt-get update && sudo apt-get install -y git nodejs nodejs-legacy npm rethinkdb android-tools-adb python autoconf automake libtool build-essential ninja-build libzmq3-dev libprotobuf-dev git graphicsmagick yasm stow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright 2016 Google Inc. | |
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 |
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
- Example: https://gist.github.com/atenni/5604522/raw/
- Works even when you change the filename.
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]