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 class CircleTransform extends BitmapTransformation { | |
public CircleTransform(Context context) { | |
super(context); | |
} | |
@Override | |
protected Bitmap transform(BitmapPool pool, Bitmap source, int outWidth, int outHeight) { | |
return ImageUtils.getCircularBitmapImage(pool, source); | |
} |
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
# | |
# Build configuration for Circle CI | |
# | |
general: | |
artifacts: | |
- /home/ubuntu/PROJECT_NAME/MODULE_NAME/build/outputs/apk/ | |
dependencies: | |
override: |
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
alias startintent="adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X shell am start $1" | |
alias apkinstall="adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X install -r $1" | |
alias rmapp="adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X uninstall $1" | |
alias clearapp="adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X shell pm clear $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
[user] | |
name = Marko Arsic | |
email = ADD_EMAIL_HERE | |
[alias] | |
A = add -A | |
a = add | |
aa = add --all | |
ae = add --edit | |
ai = add --interactive | |
amend = commit --amend -C HEAD |
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
set rtp+=$GOROOT/misc/vim | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Maintainer: | |
" Amir Salihefendic | |
" http://amix.dk - [email protected] | |
" | |
" Version: | |
" 5.0 - 29/05/12 15:43:36 | |
" |
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
# Global gradle settings. | |
# Store in /Users/USER/.gradle/gradle.properties | |
org.gradle.jvmargs=-Xmx2048M | |
org.gradle.deamon=true | |
org.gradle.configureondemand=true | |
org.gradle.parallel=true |
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
// Swift 2 | |
let triggerTime = (Int64(NSEC_PER_SEC) * 10) | |
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, triggerTime), dispatch_get_main_queue(), { () -> Void in | |
self.functionToCall() | |
}) | |
// Swift 3 | |
unowned let unownedSelf = self | |
let deadlineTime = DispatchTime.now() + .seconds(10) |
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
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-kapt' | |
def BOOLEAN = "boolean" | |
def STRING = "String" | |
def TRUE = "true" | |
def FALSE = "false" | |
def LOG_HTTP_REQUESTS = "LOG_HTTP_REQUESTS" |
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 java.util.* | |
fun main(args: Array<String>) { | |
println("Say hello to Kotlin".withUnderscore()) | |
// ----- VARIABLES ----- |
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
// In our example, the first function, multiplyByTwo(), | |
// accepts three parameters, loops through them, | |
// multiplies them by two, and returns an array | |
// containing the result. | |
function multiplyByTwo(a, b, c) { | |
var outputArray = []; | |
for (var i = 0; i < arguments.length; i++) { | |
var currentElement = arguments[i]; |
OlderNewer