Skip to content

Instantly share code, notes, and snippets.

View jimmyFlash's full-sized avatar
:atom:

Jamal jimmyFlash

:atom:
View GitHub Profile
@caveda
caveda / Dockerfile
Created January 14, 2024 16:24
Android Base Image
FROM ubuntu:23.10
ENV ANDROID_HOME="/opt/android-sdk"
# support amd64 and arm64
RUN JDK_PLATFORM=$(if [ "$(uname -m)" = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi) && \
echo export JDK_PLATFORM=$JDK_PLATFORM >> /etc/jdk.env && \
echo export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-$JDK_PLATFORM/" >> /etc/jdk.env && \
echo . /etc/jdk.env >> /etc/bash.bashrc && \
echo . /etc/jdk.env >> /etc/profile
@ardakazanci
ardakazanci / CircularMainMenuGroup.kt
Created January 13, 2024 05:54
Circular Menu Group for jetpack compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
CircularMenuGroupTheme {
MainMenuCanvas()
}
}
}
@kozaxinan
kozaxinan / LabelWithBadge.kt
Last active August 30, 2023 14:02
A Jetpack compose implementation for displaying counter for hidden word becuase of text overflow
package foo
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
@adavis
adavis / NonOrganizerTest.kt
Last active September 17, 2021 09:32
Instrumentation tests for Jetpack Compose screen using Intents for navigation
@ExperimentalAnimationApi
@RunWith(AndroidJUnit4::class)
class NonOrganizerTest {
@get:Rule
val composeTestRule = createAndroidComposeRule<MainActivity>()
@Before
fun goToNonOrganizerFragment() {
composeTestRule.activityRule.scenario.onActivity {
@surajsau
surajsau / DragDropList.kt
Last active January 14, 2024 13:05
Drag-n-Drop implementation in Jetpack Compose
@Composable
fun DragDropList(
items: List<ReorderItem>,
onMove: (Int, Int) -> Unit,
modifier: Modifier = Modifier
) {
val scope = rememberCoroutineScope()
var overscrollJob by remember { mutableStateOf<Job?>(null) }
@PatilSiddhesh
PatilSiddhesh / Chainer.kt
Last active September 3, 2021 09:37
Kotlin-Function-Chaining-with-Composition
package com.siddroid.folding
fun main() {
// Composing our car
val car = Car.compose(Chain.carEngineType(EngineType.ELECTRIC)
.carOwnerDetails(name = "Android Dev Community",
licenceNo = "API31",
address = "California"
@teixeira0xfffff
teixeira0xfffff / ransomwarefeed.csv
Last active April 27, 2024 23:16
Ransomware Feeds
Ransomware Name URL Status
AVADDON http://avaddongun7rngel.onion/ Online
SODINOKIBI (REVIL) http://dnpscnbaix6nkwvystl3yxglz7nteicqrou3t75tpcc5532cztc46qyd.onion/ Online
NEFILIM http://hxt254aygrsziejn.onion/ Online
VFOKX (1) http://vfokxcdzjbpehgit223vzdzwte47l3zcqtafj34qrr26htjo4uf3obid.onion/ Online
VFOKX (2) http://746pbrxl7acvrlhzshosye3b3udk4plurpxt2pp27pojfhkkaooqiiqd.onion/ Online
MARKETO (deep) https://marketo.cloud/ Online
MARKETO (dark) http://g5sbltooh2okkcb2.onion/ Online
LORENZ http://lorenzmlwpzgxq736jzseuterytjueszsvznuibanxomlpkyxk6ksoyd.onion/ Online
CONTI/RYUK http://continewsnv5otx5kaoje7krkto2qbu3gtqef22mnr7eaxw3y6ncz3ad.onion/ Online
@adavis
adavis / ChipsView.kt
Last active March 26, 2024 02:00
A function to programmatically add views to ConstraintLayout with Flow
class ChipsView<T : Parcelable>(ctx: Context, attr: AttributeSet) : ConstraintLayout(ctx, attr) {
...
private fun addSubviews() {
val flow = Flow(context).apply {
id = generateViewId()
setWrapMode(Flow.WRAP_CHAIN)
setHorizontalStyle(Flow.CHAIN_PACKED)
setHorizontalAlign(Flow.HORIZONTAL_ALIGN_START)
setHorizontalBias(0f)
@riggaroo
riggaroo / create_release_branch.yml
Last active December 5, 2023 10:21
Github Action workflow for creating release branch, updating versionName and versionCode, copying strings.xml to another repo, submitting PRs as per GitFlow.
name: Create Release Branch
on:
workflow_dispatch:
inputs:
versionName:
description: 'Name of version (ie 5.5.0)'
required: true
versionCode:
description: 'Version number (50500)'
required: true
@damian-burke
damian-burke / dangerfile.js
Created September 13, 2020 21:09
Dangerfile to scan ktlint / detekt / Android Lint reports
import {danger, fail, message, warn, schedule} from 'danger'
const reporter = require("danger-plugin-lint-report")
// Scan ktlint reports
schedule(reporter.scan({
fileMask: "**/reports/ktlint/*.xml",
reportSeverity: true,
requireLineModification: true,
}))