Skip to content

Instantly share code, notes, and snippets.

View astraube's full-sized avatar
🏠
Working from home

Andre Straube astraube

🏠
Working from home
View GitHub Profile
@0xngmi
0xngmi / potential-bad-domains.txt
Last active August 27, 2024 05:12
List of domains associated with squarespace at risk of being hacked
List of domains that are registered with squarespace and thus could be vulnerable:
celer.network
pendle.finance
karak.network
compound.finance
hyperliquid.xyz
dydx.exchange
thorchain.com
threshold.network
package com.straucorp.datastorepreferences
/**
* @author Andre Straube - Created on 29/08/2021
*/
import android.content.Context
import androidx.datastore.core.DataStore
import androidx.datastore.preferences.SharedPreferencesMigration
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.intPreferencesKey
package com.straucorp.datastorepreferences.delegates
/**
* @author Andre Straube - Created on 29/08/2021
*/
import android.content.Context
import android.content.SharedPreferences
import androidx.annotation.GuardedBy
import kotlinx.coroutines.*
import kotlin.properties.ReadOnlyProperty
@astraube
astraube / RootUserChecker.kt
Last active August 29, 2024 19:43
Android root user checker
package com.github.astraube
import android.util.Log
import java.io.File
/**
* @author Andre - Created on 13/07/2021
*/
object RootChecker {
@objcode
objcode / Permissions.kt
Last active February 21, 2023 23:01
Quick demo of compose permissions using activity result API. Uses Flow instead of State to make it reusable outside of Compose.
/*
* Copyright 2020 The Android Open Source Project
*
* 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
@objcode
objcode / ComposeFormHooks.kt
Last active August 6, 2021 05:07
Playing around with form validation in compose
import androidx.compose.*
import androidx.ui.foundation.Text
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.material.Button
import androidx.ui.material.Checkbox
import androidx.ui.material.MaterialTheme
import androidx.ui.material.Surface
import androidx.ui.tooling.preview.Preview
@bencz
bencz / main.c
Last active August 18, 2021 18:22
Tipo pró!
#include <stdio.h>
#if _MSC_VER
#define ASMDEF __asm
#elif __ORANGEC__ || __DMC__
#define ASMDEF asm
#endif
int xor(int a, int b)
{