Skip to content

Instantly share code, notes, and snippets.

View stkent's full-sized avatar

Stuart Kent stkent

View GitHub Profile
stkent /
Last active January 3, 2020 20:22
Favorite Android Studio Shortcuts, v2 (Mac)


Description Shortcut
Previous/next cursor position Cmd [ / Cmd ]
Open recently used file Cmd E
Open class Cmd O
Open file Cmd Shift O
Open symbol Cmd Opt O
Find string/regex in file Cmd F
stkent /
Last active February 8, 2024 16:22
Android Bluetooth Low Energy (BLE) Resources
stkent / BlockingIntentService
Created September 2, 2016 13:02 — forked from SeanPONeil/
An extension of the IntentService class that will block an Intent from entering the queue if the same Intent is already in the queue.
package com.atami.mgodroid.util;
import java.util.LinkedList;
import android.content.Intent;
* An extension of the IntentService class that will block
stkent /
Last active March 4, 2024 11:32
IntelliJ configuration

I've tried to sync IntelliJ/Android Studio configurations across installs/machines using several different methods (including the built-in settings repository), and none seem to work as reliably as I would like.

This is a manual setup checklist that replaces those methods.

Last checked: Android Studio 2021.1.1 Patch 2

IntelliJ Configuration

In Appearance & Behavior -> Appearance:

  • Check Use smaller indents in trees.
stkent /
Created April 23, 2016 18:46 — forked from chrisroos/
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

stkent / themes-debug.xml
Last active August 27, 2015 23:35 — forked from dlew/themes-debug.xml
With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where the hell did this color come from?" You can replace your normal theme with this debug theme to help figure out the source of that color.
<!-- You can change the parent around to whatever you normally use -->
<style name="DebugColors" parent="Theme.AppCompat">
<!-- System colors -->
<item name="android:windowBackground">@color/__debugWindowBackground</item>
<item name="android:colorPressedHighlight">#FF4400</item>
<item name="android:colorLongPressedHighlight">#FF0044</item>
<item name="android:colorFocusedHighlight">#44FF00</item>
<item name="android:colorActivatedHighlight">#00FF44</item>
<?xml version="1.0" encoding="utf-8"?>
<color name="red_50">#fde0dc</color>
<color name="red_100">#f9bdbb</color>
<color name="red_200">#f69988</color>
<color name="red_300">#f36c60</color>
<color name="red_400">#e84e40</color>
<color name="red_500">#e51c23</color>
stkent /
Last active November 1, 2023 11:58
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)


  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols: