Skip to content

Instantly share code, notes, and snippets.

View volo-droid's full-sized avatar
🐈
Слава Україні!

Volo volo-droid

🐈
Слава Україні!
View GitHub Profile
@AnderWeb
AnderWeb / Simple setup for item backgrounds pre - post lollipop
Last active January 12, 2024 18:04
Simple setup for item backgrounds pre/post lollipop
AppCompat-v7:21 provides a very useful way of dealing with pressed/focused/activated states maintaining backwards compatibility downto API-7, but there's a small issue (big for some) with the default selectableItemBackground: It uses some PNGs and/or default values for API<21.
The main reason is that android drawable resource definitions (prior API 21) CANNOT use theme attributes at all, so there's no way of making something like:
<shape android:shape="rectangle">
<solid android:color="?attr/colorControlHighlight" />
</shape>
For this, I've put this simple mockup on how to give your app better drawables that the appcompat defaults.
@kaushikgopal
kaushikgopal / RoundedBitmapDrawableUsage.java
Last active March 25, 2024 13:55
RoundedImageView - drop dead easy way to do this with RoundedBitmapDrawable
Bitmap batmapBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.batman);
RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), batmapBitmap);
// option 1 h/t [Chris Banes](https://chris.banes.me/)
circularBitmapDrawable.setCornerRadius(batmapBitmap.getWidth());
// option 2 h/t @csorgod in the comments
circularBitmapDrawable.setCircular(true);
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 25, 2024 06:10
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@Zenexer
Zenexer / Mac Keyboard Symbols.md
Last active May 4, 2024 02:14
List of Mac/Apple keyboard symbols
@akashnimare
akashnimare / README.md
Last active May 28, 2024 14:40
A Beginners Guide to writing a Kickass README ✍

Project title

A little info about your project and/ or overview that explains what the project is about.

Motivation

A short description of the motivation behind the creation and maintenance of the project. This should explain why the project exists.

Build status

Build status of continus integration i.e. travis, appveyor etc. Ex. -

Build Status

@yan12125
yan12125 / BUILDING.md
Created April 14, 2017 17:32
Build a custom kernel for Android emulator
git clone https://android.googlesource.com/kernel/goldfish/ -b android-goldfish-3.18
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9
cd goldfish
export CROSS_COMPILE=x86_64-linux-android-
export ARCH=x86_64
export PATH=$PATH:/path/to/x86_64-linux-android-4.9/bin
make x86_64_ranchu_defconfig
make menuconfig  # enable overlayfs and namespaces support here
make -j8
@iGlitch
iGlitch / saveme.sh
Last active June 2, 2024 10:39
init.d script for Google Pixel for performance and battery tweaks
#!/system/bin/sh
# assuming youu have magisk, put this in /data/adb/service.d/
sleep 22;
# Disable sysctl.conf to prevent ROM interference #1
if [ -e /system/etc/sysctl.conf ]; then
mount -o remount,rw /system;
mv /system/etc/sysctl.conf /system/etc/sysctl.conf.bak;
mount -o remount,ro /system;
@cristianmiranda
cristianmiranda / brcmfmac43602-pcie.txt
Created April 23, 2020 19:03
brcmfmac43602-pcie.txt
boardrev=0x1101
sromrev=11
boardtype=0x073e
vendid=0x14e4
devid=0x43ba
macaddr=00:90:4c:0d:f4:3e
ccode=0
@rob-hills
rob-hills / ubuntu-22.04-mbp-a1707.md
Last active July 10, 2024 21:13
Ubuntu 22.04 on MacBook Pro 2017 (A1707, MBP 14,3)

Summary

Random set of notes and links that have helped me in the saga to get Ubuntu 22.04 up and running on my 2017 MacBook Pro These notes are mainly for myself in the event that I have to do this again some day. But if you find them helpful, that's great.

Important update

Unfortunately the MacBookPro that I bought second hand turned out to be a dud with some serious hardware flaws that didn't show up until a couple of months after I'd bought it.

I've since purhcased another laptop so I'm not going to be able to maintain this GIST.

I'll leave it here for now in case others want to contribute updates, or clone it. If you feel it's out of date or misleading or a waste of time, let me know in the comments and I'll remove it.