Skip to content

Instantly share code, notes, and snippets.

@sandipchitale
sandipchitale / App.java
Last active November 10, 2025 04:27
All Emojis in java #java #emojis
import java.util.stream.IntStream;
import static java.lang.Character.getName;
import static java.lang.Character.toChars;
interface App {
record Emoji(int codePoint){
String name(){
@sandipchitale
sandipchitale / Bundled plugins.txt
Created November 2, 2025 21:45
Bundled plugins for IntelliJ IDEA 2025.3 (253.27864.23): #intellij
Bundled plugins for IntelliJ IDEA 2025.3 (253.27864.23):
AngularJS (Angular)
ByteCodeViewer (Bytecode Viewer)
Coverage (Code Coverage for Java)
Docker (Docker)
Git4Idea (Git)
HtmlTools (HTML Tools)
JBoss (WildFly)
JSIntentionPowerPack (JavaScript Intention Power Pack)
@sandipchitale
sandipchitale / gradle.properties
Last active December 30, 2024 00:42
Configure runIde task of JetBrains plugin gradle build to use locally installed IDE #jetbrains-plugin
# This file should be in ~/.gradle/gradle.properties
#
# In build.gradle.kt
# tasks {
# ...
# runIde {
# if (project.hasProperty("runIde_ideDir")) {
# ideDir = file("${project.extra["runIde_ideDir"]}")
# }
# }
runIde_ideDir=/home/sandipchitale/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate
@sandipchitale
sandipchitale / Search.java
Created December 26, 2024 21:24
Search in text area #search-in-java-swing-text-area
private void searchActionMap(String text, JTextArea textArea) {
if (text.isEmpty()) {
textArea.setCaretPosition(0);
} else {
int index = textArea.getText().toLowerCase().indexOf(text.toLowerCase(), textArea.getCaretPosition());
if (index == -1) {
// Try to wrap
index = textArea.getText().toLowerCase().indexOf(text.toLowerCase());
if (index == -1) {
@sandipchitale
sandipchitale / KeyEventCombinationTable.java
Last active December 14, 2024 11:09
KeyEventCombinationTable #KeyEventCombinationTable
import java.awt.event.KeyEvent;
import java.util.*;
public class KeyEventCombinationTable {
public static void main(String[] args) {
// Get all VK_ fields
List<String> vkFields = new ArrayList<>();
// List<String> asciiChars = new ArrayList<>();
// Collect VK_ fields
@sandipchitale
sandipchitale / ExpandableMenu.kt
Created December 4, 2024 10:43
Permanent main menu in JetBrains IDEs #jetbrains #IJPL-43725
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
@file:Suppress("ReplaceRangeToWithUntil")
package com.intellij.openapi.wm.impl.customFrameDecorations.header.toolbar
import com.intellij.ide.ProjectWindowCustomizerService
import com.intellij.openapi.actionSystem.impl.ActionMenu
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.util.SystemInfoRt
import com.intellij.openapi.util.registry.Registry
@sandipchitale
sandipchitale / NamesToDiff1Repository.java
Created October 17, 2024 05:29
Use ctid in spring data JPS repository #postgres #sringdatajpa
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import java.util.Optional;
public interface NamesToDiff1Repository extends CrudRepository<NamesToDiff1, Long> {
@Query(value = "SELECT ctid FROM names", nativeQuery = true)
Iterable<Object> findAllRowIds();
@Query(value = "SELECT * FROM names WHERE ctid = ?::tid", nativeQuery = true)
@sandipchitale
sandipchitale / URL.txt
Last active October 14, 2024 08:04
start.spring.io #start-spring-io
Sample url to load config:
https://start.spring.io/#!type=gradle-project&language=java&bootVersion=3.3.4&baseDir=demo&groupId=com.example&artifactId=demo&name=BABA&description=BUI%20project%20for%20Spring%20Boot&packageName=com.example.demo&packaging=jar&javaVersion=17&dependencies=web
https://start.spring.io/#!type=gradle-project
language=java
bootVersion=3.3.4
baseDir=demo
@sandipchitale
sandipchitale / linux.sh
Last active October 8, 2024 22:07
Netstat comand and output #netstat
> netstat -anpt46
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3200 0.0.0.0:* LISTEN 7430/java
tcp 0 0 127.0.0.1:52829 0.0.0.0:* LISTEN 2213/./jetbrains-to
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:27500 0.0.0.0:* LISTEN -