create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| // error image in the phone | |
| Glide.with(context) | |
| .load("yourImageURL") | |
| .placeholder(R.drawable.ic_image) | |
| .error(R.drawable.ic_error) | |
| .into(imageView) | |
| // load another image error | |
| Glide.with(context) | |
| .load("yourImageURL") |
| val spanned = spannable{ bold("some") + italic(" formatted") + color(Color.RED, " text") } | |
| val nested = spannable{ bold(italic("nested ")) + url("www.google.com", "text") } | |
| val noWrapping = bold("no ") + sub("wrapping ) + sup("also ") + "works" | |
| text_view.text = spanned + nested + noWrapping |
| { | |
| "info": { | |
| "name": "Login with Amazon (OAuth)", | |
| "_postman_id": "c1a33327-55de-7a7c-0103-44829c86b65a", | |
| "description": "A small collection of sample requests in the OAuth flow for LWA authentication.", | |
| "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
| }, | |
| "item": [ | |
| { | |
| "name": "1 LWA Get Authorization Code", |
| var db = firebase.firestore(); | |
| var content = require("./sourceData.json"); | |
| content && | |
| Object.keys(content).forEach(contentKey => { | |
| const nestedContent = content[contentKey]; | |
| if (typeof nestedContent === "object") { | |
| Object.keys(nestedContent).forEach(docTitle => { | |
| firebase | |
| .firestore() |
| # Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). | |
| # Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and | |
| # run `sudo service procps start` or reboot. | |
| # Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit | |
| # | |
| # More information resources: | |
| # -$ man inotify # manpage | |
| # -$ man sysctl.conf # manpage | |
| # -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use |
| import static java.lang.Math.acos; | |
| import static java.lang.Math.cos; | |
| import static java.lang.Math.sin; | |
| /** | |
| * Calculate distance between coordinates. | |
| */ | |
| public class DistanceCalculator { | |
| static double PI_RAD = Math.PI / 180.0; |
| Toolbar text and popup color tests | |
| 1) | |
| Input: | |
| app:theme="@style/ThemeOverlay.AppCompat.Light" | |
| app:popupTheme="@style/ThemeOverlay.AppCompat.Light" | |
| Output: | |
| Toolbar: black text, primaryColor background | |
| Popup: black text, white background |
| import android.app.Activity; | |
| import android.app.Service; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.IntentFilter; | |
| import android.os.Bundle; | |
| import android.os.IBinder; | |
| import android.support.v4.content.LocalBroadcastManager; |
| private class HttpInterceptor implements Interceptor { | |
| @Override | |
| public Response intercept(Chain chain) throws IOException { | |
| Request request = chain.request(); | |
| //Build new request | |
| Request.Builder builder = request.newBuilder(); | |
| builder.header("Accept", "application/json"); //if necessary, say to consume JSON | |