- basic build.gradle directory using flatDir
repositories {
mavenCentral()
flatDir {
dirs 'libs'
#!/bin/bash | |
############################################### | |
# How to use from terminal: | |
# $> mirakle.sh on – to enable | |
# $> mirakle.sh off – to disable | |
############################################### | |
MIRAKLE_INIT_SCRIPT_DIR="${HOME}/.gradle/init.d/" | |
MIRAKLE_INIT_SCRIPT_FILE="${MIRAKLE_INIT_SCRIPT_DIR}/mirakle_init.gradle" |
#!/bin/bash | |
## postinstall script to remove CCDA applications | |
# remove any existing version of the tool | |
echo "Moving the CC Cleaner app to Utilities in case users need it later" | |
rm -rf /Applications/Utilities/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app ||: | |
mv /Applications/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app /Applications/Utilities/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app | |
# run the cleaner tool to remove EVERYTHING! | |
echo "Running the CC Cleaner app with 'removeAll=All' option" |
package com.filipkowicz.headeritemdecorator | |
/* | |
solution based on - based on Sevastyan answer on StackOverflow | |
changes: | |
- take to account views offsets | |
- transformed to Kotlin | |
- now works on viewHolders |
import android.animation.Animator | |
import android.animation.ObjectAnimator | |
import android.annotation.TargetApi | |
import android.content.Context | |
import android.graphics.Outline | |
import android.os.Build | |
import android.transition.Transition | |
import android.transition.TransitionValues | |
import android.util.AttributeSet | |
import android.util.Property |
// kotlin.collections | |
inline fun <T> Array<out T>.takeWhileInclusive( | |
predicate: (T) -> Boolean | |
): List<T> { | |
var shouldContinue = true | |
return takeWhile { | |
val result = shouldContinue | |
shouldContinue = predicate(it) | |
result |
package gdax.notification | |
import gdax.conf.App | |
import gdax.utils.logV | |
import kotlinx.coroutines.experimental.* | |
import java.io.BufferedOutputStream | |
import java.io.BufferedReader | |
import java.io.InputStreamReader | |
import java.net.DatagramPacket | |
import java.net.DatagramSocket |
require "lifx" # http://www.rubydoc.info/gems/lifx | |
def calculate_color(i) # 0 <= i <= 1 | |
h = [40 * 2 * i, 40].min # will be 40 (yellow) at i=1/2 and stay there | |
s = 1.0 - [(i - 0.5) * 2, 0].max # will be 1 until i=1/2 and then go down to 0 | |
b = i | |
LIFX::Color.hsbk(h, s, b, LIFX::Color::KELVIN_MIN) | |
end | |
duration = 10 * 60 # seconds |