Skip to content

Instantly share code, notes, and snippets.

View ilyasKerbal's full-sized avatar

ILYAS KERBAL ilyasKerbal

View GitHub Profile
@KlassenKonstantin
KlassenKonstantin / RoundedCornerSurface.kt
Created August 9, 2023 15:21
Keep inner radii appealing
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
InnerRadiusTheme {
// A surface container using the 'background' color from the theme
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
Column(
verticalArrangement = Arrangement.Center
) {
@DavideGalilei
DavideGalilei / sqlcipher_dump.js
Created December 8, 2022 11:12
Dump sqlcipher me.lam.calculatorvault sqlite database using Frida [ROOT]
// Thanks to https://ackcent.com/recovering-sqlcipher-encrypted-data-with-frida/
// frida -U -l sqlcipher_dump.js -f me.lam.calculatorvault
Java.perform(function() {
function dumpDb(File, db, path) {
var file = File.$new(path + ".plaintext");
file.delete();
db.rawExecSQL("ATTACH DATABASE '" + path + ".plaintext' AS plaintext KEY '';SELECT sqlcipher_export('plaintext');DETACH DATABASE plaintext;");
console.warn("\t[+] Dumped plaintext database at " + path + ".plaintext");
}
@dlew
dlew / trombonechamp.kt
Created September 24, 2022 14:36
Trombone Champ hacky trombone code
import be.tarsos.dsp.AudioEvent
import be.tarsos.dsp.io.jvm.AudioDispatcherFactory
import be.tarsos.dsp.pitch.PitchDetectionHandler
import be.tarsos.dsp.pitch.PitchDetectionResult
import be.tarsos.dsp.pitch.PitchProcessor
import be.tarsos.dsp.pitch.PitchProcessor.PitchEstimationAlgorithm
import java.awt.Robot
import java.awt.event.InputEvent
import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit
@c5inco
c5inco / SwipeableCards.kt
Last active April 21, 2024 13:06
Jetpack Compose implementation of inspiration: https://twitter.com/philipcdavis/status/1534192823792128000
package des.c5inco.cardswipecompose
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.calculateTargetValue
import androidx.compose.animation.core.keyframes
import androidx.compose.animation.splineBasedDecay
@RageshAntony
RageshAntony / App.def
Last active May 2, 2024 10:28
Kotlin/Native C Interop - Usage in Kotlin class
headers = nuklear.h App.h nuklear_glfw_gl2.h nk_defines.h /usr/include/GLFW/glfw3.h /usr/include/GLFW/glfw3native.h
compiler-options = -framework OpenGl
package = glfw
linkerOpts.osx = -L/opt/local/lib -L/usr/local/lib -lglfw
linkerOpts.linux = -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu -lglfw -lGLU -lGL -lglut
linkerOpts.mingw = -lglfw
@jacopo-j
jacopo-j / frida-spoof.js
Last active May 20, 2024 09:14
Frida script to spoof and hide several Android identifiers
/* Utilities */
var RANDOM = function() {};
function _randomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function _randomHex(len) {
var hex = '0123456789abcdef';
@rengler33
rengler33 / scrape_with_logs.py
Last active June 1, 2024 00:23
How to Capture Network Traffic When Scraping with Selenium & Python
# see rkengler.com for related blog post
# https://www.rkengler.com/how-to-capture-network-traffic-when-scraping-with-selenium-and-python/
import json
import pprint
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
capabilities = DesiredCapabilities.CHROME
@varunon9
varunon9 / AlwaysRunningAndroidService.md
Last active April 20, 2024 23:38
How to create an always running service in Android

Full Source Code: https://github.com/varunon9/DynamicWallpaper/tree/always_running_service

Steps-

  1. Create a Foreground Service (MyService.java)
  2. Create a Manifest registered Broadcast Receiver (MyReceiver.java) which will start your Foreground Service
  3. In onDestroy lifecycle of MyService, send a broadcast intent to MyReceiver
  4. Launch the MyService on app start from MainActivity (see step 8)
  5. With above 4 steps, MyService will always get re-started when killed as long as onDestroy of Service gets called
  6. onDestroy method of Service is not always guaranteed to be called and hence it might not get started again
@einichi
einichi / getIP.gs
Created December 25, 2019 07:50
Get IP Address of Hostname - Google App Script
function getIP(host, recordType) {
// Specify record type as per described here: https://en.wikipedia.org/wiki/List_of_DNS_record_types
// For example, 'A', 'AAAA', 'NS', etc...
// So your Google Sheets formula would be =getIP("www.example.com", "A")
var url = "https://dns.google.com/resolve?name=" + host + "&type=" + recordType;
var json = UrlFetchApp.fetch(url);
var response = JSON.parse(json);
var answer = response.Answer;
var ip = "";
if (typeof answer != "undefined") {
@handstandsam
handstandsam / SSLHandshakeInterceptor.java
Created April 7, 2017 17:57
OkHttp 3 SSL Handshake Interceptor - Prints TLS Version & Cipher Suite Used
import android.util.Log;
import java.io.IOException;
import okhttp3.CipherSuite;
import okhttp3.Handshake;
import okhttp3.Response;
import okhttp3.TlsVersion;
/** Prints TLS Version and Cipher Suite for SSL Calls through OkHttp3 */
public class SSLHandshakeInterceptor implements okhttp3.Interceptor {