I hereby claim:
- I am r0adkll on github.
- I am r0adkll (https://keybase.io/r0adkll) on keybase.
- I have a public key whose fingerprint is 2BDD 0597 7238 19D0 0075 18FB FEEE 9236 FBB6 9F6B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| /* | |
| * Copyright © 52inc 2015. | |
| * All rights reserved. | |
| */ | |
| apply plugin: 'org.ajoberstar.grgit' | |
| import groovy.json.* | |
| def versionFile = file("../version.json") |
| private static float mCurrentBatteryPct; | |
| private static long mCurrentBatteryPctDateMs; | |
| /** | |
| * A flavor of {@link #getCurrentBatteryLevel(Context)} that only polls the battery level from the OS | |
| * every once in a while in an attempt to limit battery drain vs battery data freshness. | |
| * | |
| * @param readingPeriodMs the reading period (ms) | |
| * @return the current battery level(%) |
| String nickName; | |
| try { | |
| Cursor c = getActivity().getContentResolver().query(ContactsContract.Profile.CONTENT_URI, null, null, null, null); | |
| c.moveToFirst(); | |
| nickName = c.getString(c.getColumnIndex("display_name")).concat("'s Android"); | |
| c.close(); | |
| }catch (Exception e){ | |
| Timber.e("Unable to load user's contact information, reverting to default device name"); | |
| nickName = Build.MANUFACTURER + " - " + Build.PRODUCT; | |
| } |
| /** | |
| * Apply kerning to a string | |
| * | |
| * @param src the source string | |
| * @param kerning the amount of kerning | |
| * @return the spannable output | |
| */ | |
| public static Spannable applyKerning(CharSequence src, float kerning) { | |
| if (src == null) return null; | |
| final int srcLength = src.length(); |
| #!/bin/bash | |
| # Post-Commit hook text | |
| post_commit_hook_base='#!/bin/sh | |
| ### lolcommits hook (begin) ### | |
| export LANG=en_US.UTF-8 | |
| export LANGUAGE=en_US.UTF-8 | |
| export LC_ALL=en_US.UTF-8 | |
| export PATH="/usr/bin:/usr/local/bin:$PATH"\n' | |
| post_commit_hook_suffix='\n### lolcommits hook (end) ###' |
| <?php | |
| /*************************************************************************************************** | |
| * | |
| * Step 1: Save the sent file locally on the server | |
| * | |
| */ | |
| $file_name = basename($_FILES["file"]["name"]); | |
| $target_file = "images/".basename($_FILES["file"]["name"]); | |
| if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) { |
| <RelativeLayout | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" > | |
| <android.support.v7.widget.Toolbar | |
| android:id="@+id/appbar" | |
| android:layout_height="wrap_content" | |
| android:layout_width="match_parent" | |
| android:minHeight="?attr/actionBarSize" | |
| android:elevation="6dp" |
| /** | |
| * Dev tools and the play store (and others?) launch with a different intent, and so | |
| * lead to a redundant instance of this activity being spawned. <a | |
| * href="http://stackoverflow.com/questions/17702202/find-out-whether-the-current-activity-will-be-task-root-eventually-after-pendin" | |
| * >Details</a>. | |
| */ | |
| private boolean isWrongInstance() { | |
| if (!isTaskRoot()) { | |
| Intent intent = getIntent(); | |
| boolean isMainAction = intent.getAction() != null && intent.getAction().equals(ACTION_MAIN); |
| <!-- Colors specific to Material themes. --> | |
| <resources> | |
| <!-- RED --> | |
| <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> |