Skip to content

Instantly share code, notes, and snippets.

View Gnzlt's full-sized avatar

Gonzalo Toledano Gnzlt

View GitHub Profile
@johnwgillis
johnwgillis / How to setup GPG for git.md
Last active October 9, 2025 12:16
How to setup GPG for signing commits with Git, SourceTree, and GitHub on Mac

How to setup GPG for signing commits with Git, SourceTree, and GitHub on Mac

  1. Install GPG tools
    1. Install GPG tools and setup pin entry by running:
    brew install gnupg pinentry-mac
    mkdir -m 700 -p ~/.gnupg
    echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
    killall gpg-agent
    
@gabrielemariotti
gabrielemariotti / README.MD
Last active September 24, 2024 09:22
How to use the ShapeableImageView.

The Material Components Library introduced with the 1.2.0-alpha03 the new ShapeableImageView.

In your layout you can use:

 <com.google.android.material.imageview.ShapeableImageView
      android:id="@+id/image_view"
      app:srcCompat="@drawable/..." />

Then in your code apply the ShapeAppearanceModel to define your custom corners:

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active December 21, 2025 08:18
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

package com.satya.arcoresample
import android.content.Context
import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import android.hardware.SensorManager
import android.location.Location
import android.os.Build
import android.os.Bundle
@jishindev
jishindev / AwsDataFetcher.kt
Created July 2, 2019 06:30
Data fetcher that can be registered with a Glide module to load data from AWS S3 Storage
class AwsDataFetcher(private val s3Client: AmazonS3Client, private val awsImage: AwsImage) : DataFetcher<InputStream> {
override fun getDataClass() = InputStream::class.java
override fun loadData(priority: Priority, callback: DataFetcher.DataCallback<in InputStream>) {
callback.onDataReady(
s3Client.getObject(
GetObjectRequest(
awsImage.bucket,
@pedrovgs
pedrovgs / android_start_bitrise_emulator.sh
Last active August 15, 2021 10:04
A ready to work emulator for Bitrise.io
#!/usr/bin/env bash
set -e
build_dir=$(pwd)
echo "Curren build dir:"
echo $build_dir
cd $ANDROID_HOME/emulator
echo "Creating sdcard image"

Connect Firebase Hosting to Namecheap Custom Domain

SOURCE, SOURCE, SOURCE

  1. Go to Firebase's Dashboard > Develop > Hosting > Connect Domain.
  2. Enter the custom domain that you'd like to connect to your Hosting site.
  3. (Optional) Check the box to redirect of all requests on the custom domain to a second specified domain.
  4. Click Continue to initiate the validation process.
  5. Go to Namecheap's Dashboard > Domain List > Manage > Advanced DNS.
  6. Under Host Records, add a new record with:
class SingleViewTouchableMotionLayout(context: Context, attributeSet: AttributeSet? = null) :
MotionLayout(context, attributeSet) {
private val viewToDetectTouch by lazy {
if (resourceId != -1)
return@lazy findViewById<View>(resourceId)
else
return@lazy null
}
private val viewRect = Rect()
@Anton111111
Anton111111 / transparent_statusbar.java
Created February 4, 2019 12:45
Transparent statusbar
/**
* need call setFitsSystemWindows(false) on view that need it
*
* @param activity
*/
public static void setStatusBarTransparent(@NonNull Activity activity) {
if (Build.VERSION.SDK_INT >= 19 && Build.VERSION.SDK_INT < 21) {
setWindowFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, true);
}
if (Build.VERSION.SDK_INT >= 19) {
@lgvalle
lgvalle / firebase-scraping.js
Last active September 23, 2021 01:17
Firebase cloud function to scrap html and send the content with push notifications
const rp = require('request-promise');
const cheerio = require('cheerio');
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
const db = admin.firestore();
exports.allyPallyFarmersMarket = functions.https.onRequest((request, response) => {