- copy the file
commit-msgto.git/hooks/commit-msg - make sure your delete the sample file
.git/hooks/commit-msg.sample - Make commit msg executable.
chmod +x .git/hooks/commit-msg - Edit
commit-msgto better fit your development branch, commit regex and error message - Profit $$
This file contains hidden or 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.graphics.*; | |
| import com.squareup.picasso.Transformation; | |
| /** | |
| * Transforms an image into a circle representation. Such as a avatar. | |
| */ | |
| public class CircularTransformation implements Transformation | |
| { | |
| int radius = 10; |
This file contains hidden or 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
| /*** | |
| * Android L (lollipop, API 21) introduced a new problem when trying to invoke implicit intent, | |
| * "java.lang.IllegalArgumentException: Service Intent must be explicit" | |
| * | |
| * If you are using an implicit intent, and know only 1 target would answer this intent, | |
| * This method will help you turn the implicit intent into the explicit form. | |
| * | |
| * Inspired from SO answer: http://stackoverflow.com/a/26318757/1446466 | |
| * @param context | |
| * @param implicitIntent - The original implicit intent |
This file contains hidden or 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
| package trikke.gists; | |
| import android.graphics.Typeface; | |
| import android.text.Spannable; | |
| import android.text.SpannableString; | |
| import android.text.style.BackgroundColorSpan; | |
| import android.text.style.ForegroundColorSpan; | |
| import android.text.style.RelativeSizeSpan; | |
| import android.text.style.StrikethroughSpan; | |
| import android.text.style.StyleSpan; |
This file contains hidden or 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.ObjectAnimator; | |
| import android.animation.TypeEvaluator; | |
| import android.content.Context; | |
| import android.util.AttributeSet; | |
| import android.util.Log; | |
| import android.util.Property; | |
| import android.widget.TextView; | |
| /** |
- Android SDK in $PATH
- ImageMagick (Ubuntu: sudo apt-get install imagemagick)
$ bash adbscreen.sh a_filenameTakes a screenshot (e.g. a_filename.png) from the connected android device (or emulator, depending on what adb selects) and puts it into the working directory. The script will repaint the left part of the notification bar so that any pending notifications will be hidden.
This file contains hidden or 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
| package com.pixite.fragment.widget; | |
| import android.content.res.Resources; | |
| import android.graphics.Canvas; | |
| import android.graphics.ColorFilter; | |
| import android.graphics.Rect; | |
| import android.graphics.drawable.Drawable; | |
| import android.graphics.drawable.Drawable.Callback; | |
| import android.view.Gravity; |
This file contains hidden or 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
| MIT License | |
| Copyright (c) 2020 Jan Heinrich Reimer | |
| 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: |
This file contains hidden or 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 AvatarView extends AppCompatImageView { | |
| /* | |
| * Path of them image to be clipped (to be shown) | |
| * */ | |
| Path clipPath; | |
| /* | |
| * Place holder drawable (with background color and initials) | |
| * */ |
This file contains hidden or 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
| /* | |
| * Copyright (C) 2017 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 |