This file contains hidden or 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
sudo chown -R $(whoami) /usr/local/* |
This file contains hidden or 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
val Int.dp: Int | |
get() = (this * Resources.getSystem().displayMetrics.density).toInt() |
This file contains hidden or 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
var field_data = { | |
"anonymous_requester_email": "", // email | |
"subject": "", // subject | |
"description": "that shit cray", // description | |
"custom_fields_XXXXXXX": "", // your custom field | |
} | |
// parse it out for our url format | |
var q = [] | |
for ( var k in field_data ) { |
This file contains hidden or 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 NetworkConnectivityShould { | |
@Rule public ImmediateSchedulersTestRule rule = new ImmediateSchedulersTestRule(); | |
@Mock private ConnectivityManager mockConnectivityManager; | |
@Mock private Context mockContext; | |
private NetworkConnectivity networkConnectivity; | |
@Before public void setUp() { |
This file contains hidden or 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 interface AddressProvider { | |
int MAX_RESULTS = 1; | |
Observable<Map<String, String>> getRealAddressList(TripLocation... locationIds); | |
String getImmediateRealAddress(TripLocation tripLocation); | |
Observable<String> getRealAddress(TripLocation tripLocation); | |
} |
This file contains hidden or 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 NetworkConnectivity { | |
@VisibleForTesting public static final String SYSTEM_SERVICE = Context.CONNECTIVITY_SERVICE; | |
@VisibleForTesting public Subscription networkSubscription = Subscriptions.empty(); | |
public void addConnectivityCallback(Context context, ConnectivityCallback callback) { | |
networkSubscription = | |
createConnectivityObserver(context).observeOn(new MainThread().getScheduler()) | |
.subscribe(callback); | |
} |
This file contains hidden or 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
@Test public void navigate_to_splash_on_save_if_has_changes() { | |
when(mockApplicationPreferences.getCountry()).thenReturn("fake"); | |
when(mockApplicationPreferences.getLanguage()).thenReturn("fake"); | |
ConnectivityManager mockConnectivityManager = Mockito.mock(ConnectivityManager.class); | |
when(mockContext.getSystemService(anyString())).thenReturn(mockConnectivityManager); | |
NetworkInfo mockNetworkInfo = Mockito.mock(NetworkInfo.class); | |
when(mockConnectivityManager.getActiveNetworkInfo()).thenReturn(mockNetworkInfo); | |
when(mockNetworkInfo.isConnectedOrConnecting()).thenReturn(true); | |
when(mockPreferencesView.getContext()).thenReturn(mockContext); |
This file contains hidden or 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 *; | |
import android.annotation.SuppressLint; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.IntentSender; | |
import android.location.Location; | |
import android.os.Looper; | |
import android.support.annotation.VisibleForTesting; | |
import com.google.android.gms.common.api.ApiException; |