Skip to content

Instantly share code, notes, and snippets.

View johnny3young's full-sized avatar

Johnny Young johnny3young

  • Medellin, Colombia
View GitHub Profile
@johnny3young
johnny3young / CircleTransformation.kt
Created July 18, 2019 22:56 — forked from yusukezzz/CircleTransformation.kt
Picasso circle transformation by kotlin
import android.graphics.*
import com.squareup.picasso.Transformation
// https://gist.github.com/codezjx/b8a99374385a0210edb9192bced516a3
class CircleTransformation: Transformation {
companion object {
private val KEY = "circleImageTransformation"
}
override fun transform(source: Bitmap): Bitmap {
// List with required permissions
private val REQUIRED_SDK_PERMISSIONS = arrayOf(Manifest.permission.ACCESS_FINE_LOCATION)
private fun checkPermissions() {
val missingPermissions = ArrayList<String>()
// check all required dynamic permissions
for (permission in REQUIRED_SDK_PERMISSIONS) {
val result = ContextCompat.checkSelfPermission(this, permission)
if (result != PackageManager.PERMISSION_GRANTED) {
missingPermissions.add(permission)
Android developers resources
Getting started in Android development
Android developers
- official website https://developer.android.com/
- Codelabs https://codelabs.developers.google.com/
- Youtube https://www.youtube.com/user/androiddevelopers
Kotlin
- https://kotlinlang.org/
@johnny3young
johnny3young / Code.gs
Created August 13, 2020 04:59 — forked from rheajt/Code.gs
google apps script to open a new website in a new window
function openTab() {
var selection = SpreadsheetApp.getActiveSheet().getActiveCell().getValue();
var html = "<script>window.open('" + selection + "');google.script.host.close();</script>";
var userInterface = HtmlService.createHtmlOutput(html);
SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab');
}
@johnny3young
johnny3young / plugins.md
Created May 7, 2021 19:18 — forked from Klerith/plugins.md
Flutter: Curso de Flutter - Instalaciones recomendadas
@johnny3young
johnny3young / gist:82b7c09cc5b97559af711bac1fc4cd83
Created May 30, 2021 02:42 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: