Skip to content

Instantly share code, notes, and snippets.

View vivekgidmare's full-sized avatar

Vivek Gidmare vivekgidmare

  • Bengaluru
View GitHub Profile
@theapache64
theapache64 / crashlytics_auto_redirect.js
Created August 26, 2022 06:31
Auto redirect to different account - crashlytics
// Extension URL RegEx : https:\/\/console.firebase.google.com\/u\/0\/.+
var accountIndex = 1 // Auto redirect account index
var newUrl = "https://console.firebase.google.com/u/"
+ accountIndex
+ window.location.toString().split("/u/0")[1]
window.location = newUrl
@racka98
racka98 / CollapsingToolbarBase.kt
Last active September 9, 2022 11:33
Collapsing Toolbar with Jetpack Compose using NestedScrollConnection
/**
* Collapsing Toolbar that can be used in a topBar slot of Scaffold.
* It has a back button, default bottom rounded corners
* & a box scope which holds content centered by default.
* You need to implement nestedScrollConnection to set the offset values
* See Usage of this in DashboardScreen or TasksScreen or GoalsScreen
*
* To use this Toolbar without a heading text just make toolbarHeading `null`
* To Disable the back button at the top set showBackButton to false
*
@jdjuan
jdjuan / meta-regimen.md
Last active June 15, 2018 22:32
Meta Regimen: How to stick to your habits

Meta Regimen

Lessons I've learned throughout the years to keep up with my habits.

1. Motivate Yourself 💪

Nothing will make you skip your habits more than the lack of motivation

  • Believe you can
  • Watch motivational videos
@mohamedebrahim96
mohamedebrahim96 / activity_main2.xml
Last active December 12, 2018 23:10
The function of the button at the center is to call an activity and the TabLayout will be place at the bottom of the screen.
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.vacuum.app.cinema.MainActivity">
<!--SOME CODE FOR MY AppBarLayout-->
<!--SOME CODE FOR MY ToolBar-->
@ChanSek
ChanSek / proguard-warning-play-services
Created July 19, 2017 10:59
ProGuard warnings for Google Play Services
Initializing...
Note: com.google.android.gms.cast.framework.CastContext calls '(com.google.android.gms.cast.framework.OptionsProvider)Class.forName(variable).newInstance()'
Note: com.google.android.gms.internal.ql: can't find dynamically referenced class com.google.appengine.api.ThreadManager
Note: com.google.android.gms.internal.zzcem: can't find dynamically referenced class android.os.SystemProperties
Note: com.google.protobuf.zzc: can't find dynamically referenced class com.google.protobuf.ExtensionRegistry
Note: com.google.protobuf.zzd: can't find dynamically referenced class com.google.protobuf.Extension
Note: com.google.protobuf.zze: can't find dynamically referenced class libcore.io.Memory
Note: com.google.protobuf.zze: can't find dynamically referenced class org.robolectric.Robolectric
Note: the configuration keeps the entry point 'com.google.ads.mediation.AbstractAdViewAdapter { com.google.android.gms.ads.AdRequest zza(android.content.Context,com.google.android.
gms.ads.mediation.MediationAdRequest,a
@nickbutcher
nickbutcher / MainActivity.java
Last active August 20, 2021 16:15
A quick sample of the new physics-based animation library added in Support Library 25.3.0 docs: https://developer.android.com/reference/android/support/animation/package-summary.html output: https://twitter.com/crafty/status/842055117323026432
/*
* Copyright 2017 Google Inc.
*
* 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
/*
* Copyright 2016 Google Inc.
*
* 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
@nickbutcher
nickbutcher / 1_drawable_ic_hash_io16.xml
Last active June 16, 2020 19:28
Animated Stroke. The google I/O website this year (https://google.com/io) has some funky animated lettering. I especially liked the animated stroke around the letters and wondered how you might implement that on Android. Turns out that AnimatedVectorDrawable makes this very easy! Here's how it looks: https://twitter.com/crafty/status/71077957997…
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Google Inc.
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
@dlew
dlew / File.java
Created March 1, 2016 20:46
Automated onError() message generation
public static Action1<Throwable> crashOnError() {
final Throwable checkpoint = new Throwable();
return throwable -> {
StackTraceElement[] stackTrace = checkpoint.getStackTrace();
StackTraceElement element = stackTrace[1]; // First element after `crashOnError()`
String msg = String.format("onError() crash from subscribe() in %s.%s(%s:%s)",
element.getClassName(),
element.getMethodName(),
element.getFileName(),
element.getLineNumber());
@koesie10
koesie10 / ApiModule.java
Created October 3, 2015 07:40
Retrofit 1 error handling behaviour in Retrofit 2
// Dagger 1 example
@Module(
complete = false,
library = true
)
public final class ApiModule {
@Provides
@Singleton
Retrofit provideRetrofit(Gson gson, Application app) {
return new Retrofit.Builder()