Skip to content

Instantly share code, notes, and snippets.

View tatocaster's full-sized avatar
🇺🇦

Merab Tato Kutalia tatocaster

🇺🇦
View GitHub Profile
@teknogeek
teknogeek / universalUnpin.js
Last active April 21, 2024 14:27
Frida Universal™ SSL Unpinner
Java.perform(function() {
console.log('\n[.] Cert Pinning Bypass');
// Create a TrustManager that trusts everything
console.log('[+] Creating a TrustyTrustManager that trusts everything...');
var X509TrustManager = Java.use('javax.net.ssl.X509TrustManager');
var TrustyTrustManager = Java.registerClass({
name: 'com.example.TrustyTrustManager',
implements: [X509TrustManager],
methods: {
@volodia-chornenkyy
volodia-chornenkyy / detektGrabSubprojectsReports.groovy
Created January 17, 2020 16:27
Gradle task which gathers all Detekt reports from the subprojects and put it in the one folder "$rootDir/reports/detekt". It simplifies CI process a bit.
task detektGrabSubprojectsReports {
group = "Verification"
def detektSingleReportFolder = "$rootDir/reports/detekt"
def detektGeneralFolder = new File(detektSingleReportFolder)
detektGeneralFolder.mkdirs();
subprojects.findAll { subproject ->
def projectReportDir = "$subproject.buildDir/reports"
def detektReportFiles = [
"detekt.xml",
@handstandsam
handstandsam / InMemorySharedPreferences.kt
Last active August 4, 2023 06:12
Shared Preferences is an Interface, so we can back that interface by an "In Memory" version that never persists anything to the file system. I googled around and the closest thing I found was https://gist.github.com/amardeshbd/354173d00b988574ee5019c4ba0c8a0b
import android.content.SharedPreferences
/**
* In Memory implementation of [SharedPreferences], which just transiently saves data in memory, backed by a [MutableMap].
*/
class InMemorySharedPreferences : SharedPreferences {
private val preferenceValuesMap = mutableMapOf<String, Any?>()
private val changeListeners = mutableListOf<SharedPreferences.OnSharedPreferenceChangeListener>()
@dmytrodanylyk
dmytrodanylyk / description.md
Last active June 20, 2022 15:00
Where this dependency comes from?

Did you ever have android build failed​ issue because of dependency resolution?

… or you were curious where all these old rxjava dependencies come from?

You can pretty easy track the module causing issues via following gradle command.

gradlew :root-module:dependencyInsight \
--configuration debugRuntimeClasspath \ // or debugCompileClasspath
--dependency io.reactivex:rxjava:1.1.0 &gt; dependencies.txt // saves result to 'dependencies.txt' file
@sofakingforever
sofakingforever / AnimatedStarsView.kt
Last active February 3, 2022 09:21
Draw animated stars on Android view canvas - written in Kotlin - crafted with ❤️ by sofakingforever
package com.sofaking.moonworshipper.view
import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.RectF
import android.util.AttributeSet
import android.view.View
import java.util.*
import java.util.concurrent.Executors
@saber-solooki
saber-solooki / SimpleRecyclerView.java
Created July 7, 2018 18:40
Sticky Header RecyclerView
package com.saber.customstickyheader;
import android.graphics.Color;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
/*
* numbers.c
*
* Copyleft (C) 2018 Sun Dro (a.k.a. kala13x)
*
* This is the CLI client for nomrebi.com web site.
*/
#include <stdio.h>
#include <stdlib.h>
@ricknout
ricknout / CanvasMultilineText.kt
Last active October 13, 2022 12:01
A set of Kotlin extension functions and helper classes for drawing multiline text to Canvas on Android
package com.nickrout.canvasmultilinetext
import android.graphics.Canvas
import android.os.Build
import android.support.annotation.RequiresApi
import android.text.*
import androidx.core.graphics.withTranslation
import androidx.core.util.lruCache
@RequiresApi(Build.VERSION_CODES.O)
@vejei
vejei / TextViewUndoRedo.java
Created January 23, 2018 07:16
Perform undo redo operation in android edittext
package fi.iki.asb.android.logo;
/*
* THIS CLASS IS PROVIDED TO THE PUBLIC DOMAIN FOR FREE WITHOUT ANY
* RESTRICTIONS OR ANY WARRANTY.
*/
import java.util.LinkedList;
import android.content.SharedPreferences;
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.