Skip to content

Instantly share code, notes, and snippets.

View afollestad's full-sized avatar
📱

Aidan Follestad afollestad

📱
View GitHub Profile
@c5inco
c5inco / HeartRate.kt
Last active May 5, 2024 14:03
Jetpack Compose implementation of inspiration: https://twitter.com/amos_gyamfi/status/1494053914945236999
package des.c5inco.material3
import android.graphics.Matrix
import android.graphics.Path
import androidx.compose.animation.core.*
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
@lopspower
lopspower / README.md
Last active May 3, 2024 13:26
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

@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git
@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
@jonathantneal
jonathantneal / README.md
Last active March 19, 2024 23:31
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@raymondctc
raymondctc / batch_install_apk.sh
Last active March 14, 2024 16:41
Batch install apks to multiple connected devices
#!/bin/sh
adb devices | tail -n +2 | cut -sf 1 | xargs -I \{\} -P4 adb -s \{\} install -r $1
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@pditommaso
pditommaso / gist:2265496
Created March 31, 2012 14:26
Read/write input/output stream of interactive process
import java.io.*;
public class TestProcessIO {
public static boolean isAlive(Process p) {
try {
p.exitValue();
return false;
}
catch (IllegalThreadStateException e) {
@RussellCollins
RussellCollins / example_permission_setter.sh
Created December 2, 2015 08:56
Set write and read external storage permission prior to a test run so that a screenshot on fail listener can work on device targets running Android 6.0+
SDK=`adb shell getprop ro.build.version.sdk | tr -d '\r'`
echo "Device SDK level is: " $SDK
if (( "$SDK" >= 23 )) ; then
echo "Enabling read and write external storage permissions before running tests on Android 6.0+"
adb shell pm grant com.replace.with.your.app.package android.permission.WRITE_EXTERNAL_STORAGE
adb shell pm grant com.replace.with.your.app.package android.permission.READ_EXTERNAL_STORAGE
fi
@navsing
navsing / clubhouse.swift
Created February 11, 2021 21:22
Recreating ClubHouse in SwiftUI with Dark Mode
//
// Clubhouse.swift
// Playground
//
// Created by Nav Singh on 2/11/21.
//
import SwiftUI
struct Clubhouse: View {