Skip to content

Instantly share code, notes, and snippets.

View DevSrSouza's full-sized avatar

Gabriel Souza DevSrSouza

View GitHub Profile
@kevinvanmierlo
kevinvanmierlo / 0. Voyager Android Predictive Back Gesture And iOS Swipe to go back.md
Last active November 11, 2024 00:13
Voyager Android Predictive Back Gesture And iOS Swipe to go back

This is the gist which explains how to use Android predictive back gesture and iOS swipe to go back when using Voyager in Compose multiplatform.

If you are just using Android, you can merge the commonMain stuff and the androidMain stuff.

@zach-klippenstein
zach-klippenstein / Blockify.kt
Last active March 22, 2024 21:47
A Compose modifier to turn your apps into blocks (no, this has nothing to do with NFTs)
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.spring
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.detectDragGestures
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.integration.demos.BlockFilter.Companion.Lighting
@FrenchBen
FrenchBen / adb-firetv-cmd.sh
Created July 15, 2021 01:02
List of commands available for ADB against FireTV smart TV
# Connect to TV
adb connect <TV_IP>
# verify devices
adb devices
# list installed packages
adb shell pm list packages -f -3
# list all packages
adb shell pm list packages -f
@det-peralta
det-peralta / tcl.yml
Created January 20, 2020 19:14
TCL TV - android adb command - Home Assistant
entity_id: media_player.tcl_tv
command: "am start -n com.tcl.tv/.TVActivity"
@micolous
micolous / build.gradle.kts
Created October 28, 2019 08:47
run pkgConfig in gradle config for Kotlin/Native
/**
* Runs `pkg-config`:
* https://github.com/JetBrains/kotlin-native/issues/1534#issuecomment-384894431
*/
fun runPkgConfig(
vararg packageNames: String,
cflags: Boolean = false,
libs: Boolean = false): List<String> {
val p = ProcessBuilder(*(listOfNotNull(
"pkg-config",
@eriwen
eriwen / multi-language-sample-adoc-macros.adoc
Last active February 21, 2024 12:08
Multi-language examples for asciidoctor, including all the intermediate transforms, CSS, and HTML, and asciidoc source

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
@rikyperdana
rikyperdana / android-sdk-linux-cli
Last active August 21, 2018 01:07 — forked from wenzhixin/ubuntu14.04-command-line-install-android-sdk
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk lib32stdc++6 lib32z1
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
# install all sdk packages
cd android-sdk-linux/tools
./android update sdk --no-ui
@tsohr
tsohr / gist:5711945
Created June 5, 2013 06:15
Android activity manager "am" command help
adb shell am
usage: am [subcommand] [options]
usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]
[--R COUNT] [-S] [--opengl-trace] <INTENT>
am startservice <INTENT>
am force-stop <PACKAGE>
am kill <PACKAGE>
am kill-all
am broadcast <INTENT>
am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]