Skip to content

Instantly share code, notes, and snippets.

View bsobe's full-sized avatar

Barış Söbe bsobe

  • Istanbul, Turkey
View GitHub Profile
@rock3r
rock3r / README.md
Last active January 27, 2024 14:51
A simple bash script to enable demo mode on a Marshmallow+ device via ADB (based on http://bit.ly/295BHLx)

Usage

$ demo on|off [hhmm]

Enable or disable the demo mode on a connected Android device or emulator. You can also pass in a custom value for the system clock in the HHMM format (only used when you use the on command).

⚠️ This script only works on *nix systems and has only been tested on macOS with Bash (but should be portable).

@daniellevass
daniellevass / android_material_design_colours.xml
Last active March 26, 2024 15:48
Android Material Design Colours
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@JakeWharton
JakeWharton / Truss.java
Last active June 9, 2023 07:35
Extremely simple wrapper around SpannableStringBuilder to make the API more logical and less awful. Apache 2 licensed.
import android.text.SpannableStringBuilder;
import java.util.ArrayDeque;
import java.util.Deque;
import static android.text.Spanned.SPAN_INCLUSIVE_EXCLUSIVE;
/** A {@link SpannableStringBuilder} wrapper whose API doesn't make me want to stab my eyes out. */
public class Truss {
private final SpannableStringBuilder builder;
private final Deque<Span> stack;
@gabrielemariotti
gabrielemariotti / build.gradle
Last active January 12, 2024 17:41
Use signing.properties file which controls which keystore to use to sign the APK with gradle.
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}