See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| <script> | |
| document.addEventListener("DOMContentLoaded", function() { | |
| sortChildnodes(document.documentElement); | |
| function sortChildnodes(ele) { | |
| if (ele.append) { | |
| ele.childNodes.forEach(sortChildnodes); | |
| var allList = [...ele.childNodes]; | |
| var sortList = allList.filter(checkSortCondition); |
| package org.simplejavamail.sslhelper; | |
| import org.simplejavamail.internal.util.MiscUtil; | |
| @SuppressWarnings("SameParameterValue") | |
| public class KeyStoreInfo { | |
| private final String keyStorePath; | |
| private final String password; | |
| private final String type /*= "JKS"*/; |
| // works for all browsers | |
| async function supportsWebp():Promise<boolean> { | |
| const img = new Image(); | |
| return new Promise(resolve => { | |
| img.onload = function () {resolve((img.width > 0) && (img.height > 0));}; | |
| img.onerror = function () {resolve(false);}; | |
| img.src = "data:image/webp;base64," + "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"; | |
| }); | |
| } |
| # Generate a new key | |
| openssl genrsa -out server.key 2048 | |
| # Generate a new CSR | |
| openssl req -sha256 -new -key server.key -out server.csr | |
| # Check certificate against CA | |
| openssl verify -verbose -CApath ./CA/ -CAfile ./CA/cacert.pem cert.pem | |
| # Self Signed |
| class MimeType { | |
| private static final MimetypesFileTypeMap MIMETYPES_FILE_TYPE_MAP = createMap(); | |
| /** | |
| * @return a vastly improved mimetype map | |
| */ | |
| private static MimetypesFileTypeMap createMap() { | |
| try (InputStream is = MimeType.class.getClassLoader().getResourceAsStream("mimetypes.txt")) { | |
| return new MimetypesFileTypeMap(is); |
Davy Brion and Jef Claes were discussing whether or not you can have REST without HTTP. Is this another peanut butter and chocolate thing? I think it's hard to extract REST from HTTP because that is how it is defined. I mean quite literally how it is defined in Fielding's dissertation. REST, the term, is short for "representational state transfer" but it still specifically describes an architectural style of representing state transfer via the HTTP specification.
But what if we didn't let such a little thing like semantics get in our way here and only took REST for it's literal name definition and not as the specification laid out in Fielding's dissertation? What if REST only meant a representation of state transfers? I'm not muc
| # <commit-rev> = commit you want to reset repo to | |
| # <target-branch> = branch you want to truncate (probably master or develop) | |
| git checkout --orphan temp <commit-rev> | |
| git commit -m "Truncate history or Initial commit" | |
| git rebase --onto temp <commit-rev> <target-branch> | |
| git push --force |
| // cleaned up generics version of Baeldung's Dijkstra (https://www.baeldung.com/java-dijkstra) | |
| public class Dijkstra { | |
| public static <T> void findShortestPathToAllOtherNodes(Node<T> startingPoint) { | |
| startingPoint.setCost(0); | |
| Set<Node<T>> settledNodes = new HashSet<>(); | |
| Set<Node<T>> unsettledNodes = new HashSet<>(); | |
| unsettledNodes.add(startingPoint); | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Log to HTML</title> | |
| <link rel="icon" href="data:;base64,="> | |
| <script> | |
| (function(eleLocator) { | |
| fixLoggingFunc('log'); |