See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| { | |
| "theme": { | |
| "faviconColor": "#f1a517", | |
| "background": { | |
| "image": "https://www.dropbox.com/scl/fi/i4mx00cfoq5uittzd6aom/gradient.jpg?rlkey=ji6ax4so2kzgfmvd221siqn68&dl=1" | |
| } | |
| }, | |
| "config": { | |
| "faviconService": "https://www.google.com/s2/favicons?domain=$u", | |
| "systemShortcuts": [ |
| /* Copyright 2019 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 | |
| * | |
| * https://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, |
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| /** | |
| * An [Observer] for [Event]s, simplifying the pattern of checking if the [Event]'s content has | |
| * already been handled. | |
| * | |
| * [onEventUnhandledContent] is *only* called if the [Event]'s contents has not been handled. | |
| */ | |
| class EventObserver<T>(private val onEventUnhandledContent: (T) -> Unit) : Observer<Event<T>> { | |
| override fun onChanged(event: Event<T>?) { | |
| event?.getContentIfNotHandled()?.let { value -> | |
| onEventUnhandledContent(value) |
| #!/usr/bin/env python | |
| # | |
| # Convert .itermcolors files to hex colors for html | |
| import sys | |
| import xml.etree.ElementTree as ET | |
| def rgb_to_hex(rgb): | |
| return '#%02x%02x%02x' % rgb |
| // You can use maven-publish-helper.gradle script without changes and even share it between multiple | |
| // modules. Just place the maven-publish-helper.gradle file in the root directory of your project, | |
| // then apply it at the bottom of your module's build.gradle file like this: | |
| // ...content of module's build.gradle file... | |
| apply from: '../maven-publish-helper.gradle' | |
| publishing { | |
| publications { |
| If you'd like to use a .jar file in your project, but it's not available in any Maven repository, | |
| you can get around this by creating your own local repository. This is done as follows: | |
| 1 - To configure the local repository, add the following section to your pom.xml (inside the <project> tag): | |
| <repositories> | |
| <repository> | |
| <id>in-project</id> | |
| <name>In Project Repo</name> | |
| <url>file://${project.basedir}/libs</url> |
| # WildFly reverse proxy setup script. | |
| # Run with: $WILDFLY_HOME/bin/jboss-cli.sh --connect --file=ssl.cli | |
| batch | |
| /subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=redirect-socket,value=proxy-https) | |
| /subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=proxy-address-forwarding,value=true) | |
| /socket-binding-group=standard-sockets/socket-binding=proxy-https:add(port=443) | |
| run-batch |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
| public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
| private int previousTotal = 0; // The total number of items in the dataset after the last load | |
| private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
| private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
| int firstVisibleItem, visibleItemCount, totalItemCount; |
| ## One line per log entry with merge graph | |
| ## (--decorate is implicit for newer git versions?): | |
| #git log --graph --oneline --decorate | |
| ## | | |
| ## Add --branches --remotes --tags --merges to see entries for all of the | |
| ## corresponding refs, not only commits (--all for all refs). | |
| ## Format output with --pretty=tformat:'<format>' | |
| ## Interesting placeholders for oneline <format>: |