Skip to content

Instantly share code, notes, and snippets.

@PROGrand
PROGrand / FileExtensions.cs
Last active April 22, 2024 13:39
Enable file extensions view in Unity Project window.
using UnityEditor;
using UnityEngine;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Reflection;
[InitializeOnLoad]
public class FileExtensionGUI
{
@pwicherski
pwicherski / gist:4ca90188b8d65c2eb99bcc47f7cc1317
Created March 17, 2020 20:06
Android Emulator custom hardware profile
PlayStore: Does the device supports Google Play?
PlayStore.enabled [no]:
avd home that was used during the construction of this hardware.ini: This can be used by post processing tools to migrate snapshots
android.avd.home []:
sdk root that was used during the construction of this hardware.ini: This can be used by post processing tools to migrate snapshots
android.sdk.root []:
ID of the AVD being run:
@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

@zeroseis
zeroseis / disable-auto-android-file-transfer.md
Created September 14, 2015 17:28
Disable auto start for Android File Transfer
  • Close Android File Transfer
  • Open Activity Monitor and kill “Android File Transfer Agent”
  • Go to where you installed “Android File Transfer.app” (I have it under /Applications)
  • Ctrl+click –> “Show package contents”
  • Go to Contents/Resources
  • Rename “Android File Transfer Agent” to e.g. “Android File Transfer Agent_DISABLED”
  • Then go to “/Users/username/Library/Application Support/Google/Android File Transfer” and again rename the Agent app.
@JakeWharton
JakeWharton / AutoGson.java
Last active November 28, 2021 12:32
A Gson TypeAdapterFactory which allows serialization of @autovalue types. Apache 2 licensed.
import com.google.auto.value.AutoValue;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization.
* <p>
@jieyu
jieyu / AndroidInputEventPropagation.md
Created December 11, 2012 21:40
How a user input event is propagate in the Android framework and how it is delivered to the corresponding event handler.

Android Input Event Propagation

This document discusses how an input event from user (e.g. user key stroke) is propagated in Android framework, and how it is delivered to the corresponding event handler in the application.

This document is based on the code of Android 4.1.1_r6.1 (Jelly Bean).

For each application, a ViewRootImpl object is created to handle communications with the remote system WindowManagerService object. The communication is through a Linux pipe which is encapsulated in an InputChannel object (mInputChannel field in class ViewRootImpl). The ViewRootImpl object also registers an instance of InputEventReceiver when the first View object is registered with it.

frameworks/base/core/java/android/view/ViewRootImpl.java +482
@mattratleph
mattratleph / vimdiff.md
Last active April 24, 2024 11:28 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)