Skip to content

Instantly share code, notes, and snippets.

View DerGoogler's full-sized avatar
🍃
Busy.

Der_Googler DerGoogler

🍃
Busy.
View GitHub Profile
@goisneto
goisneto / run-as-termux.sh
Created April 21, 2022 15:17
Run Termux on ADB Shell like as on APP
#!/bin/sh
# Add this file on you /sdcard directory on you android Phone
# Enable Debug Mode and ADB, connect you phone on PC, Download ADB Tools
# Run "adb shell" and on adb shell run "sh /sdcard/run-as-termux.sh"
# Enjoy termux, but with restrictions to access some folders like /sdcard
TERMUX_PACKAGE=com.termux
TERMUX_PATH=$ANDROID_DATA/data/$TERMUX_PACKAGE
TERMUX_TMPDIR=$TERMUX_PATH/files/usr/tmp
@AlexVipond
AlexVipond / README.md
Last active August 8, 2025 15:50
Vue 3 effect timing APIs, and their React equivalents
Vue 3 effect timing API React equivalent
setup None
onMounted useEffect with an empty dependency list
onUpdated useEffect
onUnmounted Callback returned from useEffect with an empty dependency list
onBeforeMount None
onBeforeUpdate Render function, sort of
onBeforeUnmount None
onErrorCaptured None
@mrousavy
mrousavy / MEMOIZE.md
Last active July 3, 2025 09:48
Memoize!!! 💾 - a react (native) performance guide
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and  
returning the cached result when the same
inputs occur again.                                         
                                                     — wikipedia
@ppoffice
ppoffice / README.md
Last active August 9, 2025 04:42
Install Visual Studio Code (actually code-server) on Android
  1. Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

  2. Update system packages in Termux:

    $ pkg update -y
@mrk-han
mrk-han / change-accessibility-settings-with-adb.md
Last active April 17, 2025 14:22
Enable and Disable Android Accessibility Settings from the Command Line using ADB (Font scale, talkback, color blind)

Using ADB to control Accessbility settings for easier testing with Android Emulators + Real Devices

It's a lot easier to test accessibility on the fly using ADB. This gist attempts to make the days of navigating through the Android device settings UI to change Accessibility settings obsolete.

These ADB commands will hopefully encourage Android developers to test and use their apps with common Accessiblility settings enabled.

Credit to James Nitsch for inspiring this, and for figuring out the put commands to enable these settings.

Font Scale (Font Size -- Testing Dynamic Text)

@PasanBhanu
PasanBhanu / AndroidDownloadImage.java
Created September 26, 2019 09:04
Download Image from URL and Added to Gallery - Android (Java)
/*
This method can be used to download an image from the internet using a url in Android. This use Android Download Manager to
download the file and added it to the Gallery. Downloaded image will be saved to "Pictures"
Folder in your internal storage
*/
private void downloadImageNew(String filename, String downloadUrlOfImage){
try{
DownloadManager dm = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
Uri downloadUri = Uri.parse(downloadUrlOfImage);
@pgp
pgp / BuildRustAppForAndroid.sh
Created April 11, 2019 08:36
Cross compile RUST application for Android (uses standalone toolchains, NDK >= 19 required)
# arm
export PATH=$PATH:$HOME/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin
export CC=armv7a-linux-androideabi19-clang
export CXX=armv7a-linux-androideabi19-clang++
~/.cargo/bin/cargo build --target armv7-linux-androideabi
# aarch64
export PATH=$PATH:$HOME/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin
export CC=aarch64-linux-android21-clang
export CXX=aarch64-linux-android21-clang++
@pabloko
pabloko / AndroidJSInterfaceComplexTypes.java
Created December 8, 2018 13:20
Lets have any JSON serializable type and methods to callback on Android WebView's JSInterface
//How it works: all the script relies on a tiny javascript stub injected to webView's document that uses Proxy api and json serialicing stuff. Calls to our internal objects are proxified to a single method "__mm_handle_method", that using reflection find the target method and populate arguments exchanged in json, plus a custom interface for methods passed as argument.
package es.pabloko.webviewbridge;
import android.app.Activity;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.webkit.JavascriptInterface;
@ww9
ww9 / gist_markdown_examples.md
Last active July 24, 2025 17:24
Gist markdown examples

Gist markdown examples

A collection of Markdown code and tricks that were tested to work in Gist.

This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.

Todo

  • Reformat this whole document and assimilate these:
// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*