Skip to content

Instantly share code, notes, and snippets.

@sandipchitale
sandipchitale / settings.json
Last active April 1, 2022 08:27
VSCode borders #vscode
{
"workbench.colorCustomizations": {
"terminalCursor.foreground": "#ff0000",
"editorLineNumber.activeForeground": "#f00",
"sideBar.border": "#666666",
"editorGroup.border": "#666666",
"panel.border": "#666666",
}
}
@sandipchitale
sandipchitale / add-spring-dependecies-task.gradle
Last active April 1, 2022 04:10
Add springboot dependency version properties task #springboot
allprojects {
afterEvaluate { project ->
def springbootProject = project.plugins.hasPlugin('org.springframework.boot')
// Where the property names are generated. See:
// https://github.com/spring-projects/spring-boot/blob/25d8888aff804233086685db962c5aeeb22215e2/buildSrc/src/main/java/org/springframework/boot/build/bom/Library.java#L70
// https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-dependencies/build.gradle
if (springbootProject) {
task springbootDependencies() {
group 'springboot-dependencies'
@sandipchitale
sandipchitale / build.gradle
Last active December 9, 2022 04:44
Configure http proxy #powershell #proxy
task generateHttpProxy() {
doFirst {
println "Paste the above sysprops to your gradle.properties in your project or ${project.gradle.gradleUserHomeDir}${File.separator}gradle.properties"
}
}
defaultTasks 'generateHttpProxy'
@sandipchitale
sandipchitale / foo.html
Last active February 17, 2022 02:34
cssbattle starter #css #cssbattle
<div class="center"></div>
<div class="center"></div>
<style>
* {
box-sizing: border-box;
}
body {
display: grid;
grid-template-columns: auto;
@sandipchitale
sandipchitale / taskbar-position.hack
Last active February 3, 2022 23:53
Taskbar position hack #windows11
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3
Administrator cmd:
taskkill /f /im explorer.exe
start explorer.exe
@sandipchitale
sandipchitale / gradle-explorer.gradle
Last active January 21, 2022 06:58
objectexplorer #gradle
import javax.swing.plaf.basic.BasicLookAndFeel
import java.awt.event.*
import javax.swing.*
import javax.swing.tree.*
import java.util.concurrent.CountDownLatch
def addChild(DefaultMutableTreeNode p, String name, def value, int depth = 0) {
if (depth < 4) {
DefaultMutableTreeNode c = new DefaultMutableTreeNode("${name}: ${value}");
p.add(c)
@sandipchitale
sandipchitale / showOpenWith.cmd
Last active January 10, 2022 06:08
Show Open With Dialog
REM Show Open With Dialog for file
rundll32.exe shell32,OpenAs_RunDLL %*
@sandipchitale
sandipchitale / showprogress.ts
Last active January 4, 2022 03:54
Show progress #vscode #progress
vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
title: `Progress message`
}, (progress, token) => {
return new Promise((resolve, reject) => {
});
})
@sandipchitale
sandipchitale / outputchannel.ts
Last active January 3, 2022 07:01
Create output channel for extention #vscode #outputchannel
// Create
const outputChannel = vscode.window.createOutputChannel(context.extension.id.replace('sandipchitale.', ''));
// Use
outputChannel?.appendLine('-');
@sandipchitale
sandipchitale / filesinchangelist.ts
Last active December 29, 2021 02:07
Get files in a changelist #perforce #p4vjs
declare var p4vjs: any;
(async () => {
const workspace = await p4vjs.getClient();
let workspaceRoot = '';
const workspaceP = document.getElementById('workspace');
if (workspaceP) {
workspaceP.innerText = workspace;
}
const info = await p4vjs.p4([