(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/usr/bin/bash | |
| for commit in $(git --no-pager log --reverse --after="2016-10-01T10:36:00-07:00" --pretty=format:%H) | |
| do | |
| echo $commit | |
| git checkout $commit | |
| #write linguist data to a file | |
| echo "" >> ~/repo-linguist-report.txt | |
| echo "commit: $commit" >> ~/repo-linguist-report.txt |
| import android.animation.TypeEvaluator; | |
| import android.animation.ValueAnimator; | |
| import static java.lang.Math.pow; | |
| public class GammaEvaluator implements TypeEvaluator { | |
| private static final GammaEvaluator instance = new GammaEvaluator(); | |
| /** |
| /** | |
| * Show the activity over the lockscreen and wake up the device. If you launched the app manually | |
| * both of these conditions are already true. If you deployed from the IDE, however, this will | |
| * save you from hundreds of power button presses and pattern swiping per day! | |
| */ | |
| public static void riseAndShine(Activity activity) { | |
| activity.getWindow().addFlags(FLAG_SHOW_WHEN_LOCKED); | |
| PowerManager power = (PowerManager) activity.getSystemService(POWER_SERVICE); | |
| PowerManager.WakeLock lock = |
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * 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 |
| private Notification buildNotification() { | |
| NotificationCompat.Builder builder = new NotificationCompat.Builder(context) | |
| .setCategory(NotificationCompat.CATEGORY_EVENT) | |
| .setVisibility(NotificationCompat.VISIBILITY_PRIVATE) // default | |
| .setContentTitle(title) | |
| .setContentText(shortText) | |
| .setStyle(new NotificationCompat.BigTextStyle().bigText(fullText)) | |
| .setSmallIcon(R.drawable.ic_stat_notification) | |
| .setColor(context.getResources().getColor(R.color.my_color)) | |
| .setContentIntent(intent); |
| <!-- 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> |
| package android.app; | |
| import android.content.Context; | |
| import android.graphics.Matrix; | |
| import android.graphics.Rect; | |
| import android.graphics.RectF; | |
| import android.os.Bundle; | |
| import android.os.Handler; | |
| import android.os.Parcelable; | |
| import android.os.ResultReceiver; |
| /* | |
| * 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 |
| def toCamelCase(String string) { | |
| String result = "" | |
| string.findAll("[^\\W]+") { String word -> | |
| result += word.capitalize() | |
| } | |
| return result | |
| } | |
| afterEvaluate { project -> | |
| Configuration runtimeConfiguration = project.configurations.getByName('compile') |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.