Quick guide on how to setup git signing. Information is aggregated from following sources:
| @file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") | |
| // Tooltip implementation for AndroidX Jetpack Compose | |
| // See usage example in the next file | |
| // Tested with Compose version **1.1.0-alpha06** | |
| // Based on material DropdownMenu implementation. | |
| import androidx.compose.animation.core.MutableTransitionState | |
| import androidx.compose.animation.core.animateFloat |
| import StringUtils.encodeHex | |
| import java.io.File | |
| import java.io.FileInputStream | |
| import java.io.InputStream | |
| import java.security.MessageDigest | |
| object HashUtils { | |
| const val STREAM_BUFFER_LENGTH = 1024 |
| @file:kotlin.jvm.JvmName("SuspendRunner") | |
| import kotlinx.coroutines.* | |
| import java.util.concurrent.FutureTask | |
| import java.util.concurrent.TimeUnit | |
| import java.util.concurrent.TimeoutException | |
| import kotlin.coroutines.CoroutineContext | |
| /** |
All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.
| apply plugin: 'maven-publish' | |
| afterEvaluate { | |
| publishing { | |
| publications { | |
| maven(MavenPublication) { | |
| groupId project.ext.pomGroupID | |
| artifactId project.name | |
| version project.ext.pomVersion |
Full Source Code: https://github.com/varunon9/DynamicWallpaper/tree/always_running_service
- Create a Foreground Service (MyService.java)
- Create a Manifest registered Broadcast Receiver (MyReceiver.java) which will start your Foreground Service
- In
onDestroylifecycle of MyService, send a broadcast intent to MyReceiver - Launch the MyService on app start from MainActivity (see step 8)
- With above 4 steps, MyService will always get re-started when killed as long as
onDestroyof Service gets called onDestroymethod of Service is not always guaranteed to be called and hence it might not get started again
| 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: { |
| import android.Manifest | |
| import android.app.AppOpsManager | |
| import android.app.usage.StorageStats | |
| import android.app.usage.StorageStatsManager | |
| import android.content.Context | |
| import android.content.Intent | |
| import android.content.pm.PackageManager | |
| import android.os.Build | |
| import android.os.Bundle | |
| import android.os.Process |
To me, legacy code is simply code without tests. I’ve gotten some grief for this definition. What do tests have to do with whether code is bad? To me, the answer is straightforward, and it is a point that I elaborate throughout the book: Code without tests is bad code. It doesn’t matter how well written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse.
Four Reasons to Change Software: For simplicity’s sake, let’s look at four primary reasons to change software.