Skip to content

Instantly share code, notes, and snippets.

@LiewJunTung
LiewJunTung / rotator.rs
Created July 4, 2019 18:57
RenderScript to rotate image buffer after convert YUV to RGB
#pragma version(1)
#pragma rs java_package_name(com.liewjuntung.image)
rs_allocation inImage;
int inWidth;
int inHeight;
float rotation = 0.0f;
@blundell
blundell / clear-android-things-apps.sh
Last active April 22, 2022 17:23
Uninstall all apps on an Android Device that have the intent-filter category IOT_LAUNCHER
#!/bin/bash
sp="/-\|"
sc=0
spin() {
printf "\b${sp:sc++:1}"
((sc==${#sp})) && sc=0
}
endspin() {
printf "\r"
}
@eyecatchup
eyecatchup / colors_material.xml
Last active June 27, 2021 23:18
Android L Material Color Specs
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
<?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">#fde0dc</color>
<color name="md_red_100">#f9bdbb</color>
<color name="md_red_200">#f69988</color>
@chrislacy
chrislacy / gist:5998644
Created July 15, 2013 09:30
FragmentStatePagerAdapter that allows you to specify a Fragment's tag.
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software