Skip to content

Instantly share code, notes, and snippets.

View Tancred423's full-sized avatar
👨‍💻
Coding

Tancred Tancred423

👨‍💻
Coding
  • Germany
  • 08:41 (UTC +02:00)
View GitHub Profile
@Tancred423
Tancred423 / clean_youtube_titles.js
Last active December 8, 2023 16:35
Tapermonkey script to clean up YouTube titles - Formats fully capitalised words and removes spaces in front of question marks and exclamation marks.
// ==UserScript==
// @name Clean YouTube Titles
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Cleans up YouTube titles by formatting fully capitalised words and removing spaces in front of question marks and exclamation marks.
// @author Tancred and ChatGPT :)
// @match https://www.youtube.com/*
// @grant none
// @require https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@v1.2/waitForKeyElements.js
// ==/UserScript==
@Tancred423
Tancred423 / Main.java
Created November 16, 2019 17:23
Sorting HashMap by Value then Key
import java.util.*;
public class Main {
public static void main(String[] args) {
// Your unsorted map - an example
final Map<String, Integer> unsortedMap = new HashMap<>();
unsortedMap.put("User B", 50);
unsortedMap.put("User C", 100);
unsortedMap.put("User A", 50);