- 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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for redirecting hhtp traffic to https version of the site | |
server { | |
listen 80; | |
server_name example.com; | |
return 301 https://$server_name$request_uri; | |
} | |
# for redirecting to non-www version of the site | |
server { | |
listen 80; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Log; | |
import com.squareup.leakcanary.AnalysisResult; | |
import com.squareup.leakcanary.DisplayLeakService; | |
import com.squareup.leakcanary.HeapDump; | |
import retrofit.RestAdapter; | |
import retrofit.RetrofitError; | |
import retrofit.http.Multipart; | |
import retrofit.http.POST; | |
import retrofit.http.Part; | |
import retrofit.mime.TypedFile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I/Timeline( 4809): Timeline: Activity_launch_request id:com.github.premnirmal.tickerwidget time:352854051 | |
I/ActivityManager(14315): START u0 {cmp=com.github.premnirmal.tickerwidget/com.github.premnirmal.ticker.ui.TickerSelectorActivity} from pid 4809 | |
I/ActivityManager(14315): Displayed com.github.premnirmal.tickerwidget/com.github.premnirmal.ticker.ui.TickerSelectorActivity: +186ms | |
I/Timeline( 4809): Timeline: Activity_idle id: android.os.BinderProxy@420f4fe8 time:352854305 | |
I/Timeline(14315): Timeline: Activity_windows_visible id: ActivityRecord{42281788 u0 com.github.premnirmal.tickerwidget/com.github.premnirmal.ticker.ui.TickerSelectorActivity t68} time:352854594 | |
E/AndroidRuntime( 4809): FATAL EXCEPTION: main | |
E/AndroidRuntime( 4809): Process: com.github.premnirmal.tickerwidget, PID: 4809 | |
E/AndroidRuntime( 4809): java.lang.IllegalStateException: Exception thrown on Scheduler.Worker thread. Add `onError` handling. | |
E/AndroidRuntime( 4809): at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:50) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package at.markushi.reveal; | |
import android.app.Activity; | |
import android.graphics.Color; | |
import android.graphics.Point; | |
import android.os.Bundle; | |
import android.view.View; | |
import at.markushi.ui.RevealColorView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -z "$1" ]]; | |
then | |
echo "No SVG file specified. Exiting." | |
exit -1 | |
fi | |
ispng=$(file $1) | |
echo $ispng | grep -q SVG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CircularProgressDrawable extends Drawable | |
implements Animatable { | |
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator(); | |
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator(); | |
private static final int ANGLE_ANIMATOR_DURATION = 2000; | |
private static final int SWEEP_ANIMATOR_DURATION = 600; | |
private static final int MIN_SWEEP_ANGLE = 30; | |
private final RectF fBounds = new RectF(); |
Follow steps 2 and 3 here to create an account on Sonatype: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
If you don't have gpg
installed: brew install gpg
Create a key by running gpg --gen-key
and make sure to save your passphrase.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 Prateek Srivastava | |
* | |
* 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 |
NewerOlder