Skip to content

Instantly share code, notes, and snippets.

@rafaeltoledo
rafaeltoledo / Fastfile
Created December 5, 2018 10:16
Android Pipeline files
update_fastlane
default_platform(:android)
platform :android do
desc "Deploy a new version to the Google Play Internal track"
lane :deploy do
upload_to_play_store(track: 'internal', aab: 'app/build/outputs/bundle/release/app.aab', skip_upload_apk: true)
end
switch(dragEvent.getAction()) {
case DragEvent.ACTION_DRAG_STARTED:
Log.d(TAG, "onDrag: drag started.");
return true;
case DragEvent.ACTION_DRAG_ENTERED:
Log.d(TAG, "onDrag: drag entered.");
return true;
@dodalovic
dodalovic / a.State.kt
Last active July 8, 2023 21:28
State pattern implemented in kotlin
package patterns.head_first
class CoffeeMachine {
var state: CoffeeMachineState
val MAX_BEANS_QUANTITY = 100
val MAX_WATER_QUANTITY = 100
var beansQuantity = 0
var waterQuantity = 0
val offState = Off(this)
val noIngredients = NoIngredients(this)
@arturokunder
arturokunder / README.md
Created October 6, 2016 18:25
Verify APK signature

Do I have the correct certificate to sign my APK?

Use keytool Keytool is part of Java, so make sure your PATH has Java installation dir in it.

Get APK Certificate Signature

First, unzip the APK and extract the file /META-INF/ANDROID_.RSA (this file may also be CERT.RSA or something.RSA, but there should only be one .RSA file).

Then, run:

@kelvinst
kelvinst / git-aliases.md
Last active April 7, 2024 20:30
Git alias - seja rápido, seja breve!

Git alias - seja rápido, seja breve!

Git freak como sou, precisava compartilhar algo útil sobre ele, claro. E, já que não vejo muito por aí o pessoal usando, resolvi falar dos alias do git! É um recurso que eu uso muito, e nunca entendi porque muitas pessoas não são adeptas. 😕

Pelo nome você já deve perceber que os alias no git são atalhos. Atalhos pro quê? São atalhos para comandos do git e até comandos shell se você quiser. E é bem fácil cadastrar um alias:

$ git config --global alias.st status