Skip to content

Instantly share code, notes, and snippets.

View Sal7one's full-sized avatar
Probably making my 7th cup of Coffee

Saleh Alanazi Sal7one

Probably making my 7th cup of Coffee
View GitHub Profile
@Sal7one
Sal7one / main.kt
Created December 4, 2025 22:31
Web GPU example
package com.sal7one.webgputest
import android.os.Bundle
import android.view.SurfaceHolder
import android.view.SurfaceView
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
@Sal7one
Sal7one / readme.md
Last active November 29, 2025 01:34
Notion to md. AI slop but mostly works!

Complete Guide: Export Your Notion Workspace to Markdown Files

Overview: The Two-Step Processs

We'll use two specialized scripts:

  1. Backup Script (bulk-exporter.js): Downloads your Notion content as structured JSON
  2. Converter Script (json-to-markdown.js): Transforms JSON into beautifully formatted Markdown

Step 1: Setup Your Project

@Sal7one
Sal7one / readme.md
Last active August 21, 2025 18:07
Heroic games launcher external drive, games updating, permissions, mac os

⚠️ WARNING: This process can affect your Heroic game installs. In rare cases, if paths/manifests are broken, you may need to repair or reinstall a game. Proceed carefully and back up anything important first.


1. Identify your external drive

Run:

@Sal7one
Sal7one / build.gradle.kts
Created August 14, 2025 07:39
Remove permission on merge android
import com.android.build.api.artifact.SingleArtifact
androidComponents {
onVariants { variant ->
val cap = variant.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() }
val manifestProvider = variant.artifacts.get(SingleArtifact.MERGED_MANIFEST)
val taskName = "enforceNoUnexpectedPermissions$cap"
tasks.register(taskName) {
inputs.file(manifestProvider)
@Sal7one
Sal7one / saudi.geojson
Last active July 6, 2025 11:48
Saudi geojson.io approximation - Just a sample test not accurate
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Sal7one
Sal7one / download.sh
Last active June 9, 2025 03:24
Locally download all your repos.. don't forget to chmod x+ this
#!/bin/bash
# ==== User Configuration ====
GITHUB_USERNAME="your_github_username"
GITHUB_TOKEN="your_github_token"
PER_PAGE=100
GITHUB_API_URL="https://api.github.com"
DEST_DIR="./github_repos"
@Sal7one
Sal7one / test.kt
Created December 6, 2024 00:33
Roboelctric compose example
package com.sal7one.testingrobo
import android.app.Application
import android.content.pm.ActivityInfo
import androidx.activity.ComponentActivity
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.test.core.app.ApplicationProvider
@Sal7one
Sal7one / tabbedRow.kt
Last active July 24, 2024 06:21
TabbedRow
package com.example.salscomposecomponents
inline fun <R : Any> R.applyWhen(
condition: Boolean,
block: R.() -> R,
): R = applyChoice(condition = condition, trueBlock = block, falseBlock = { this })
inline fun <R : Any> R.applyChoice(
condition: Boolean,
trueBlock: R.() -> R,
@Sal7one
Sal7one / handlersCompose.kt
Created June 23, 2024 07:58
It's the weekend and I miss handlers :]
package com.sal7one.handler
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.os.Message
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
@Sal7one
Sal7one / README.md
Created May 27, 2024 15:44 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store