Skip to content

Instantly share code, notes, and snippets.

View indramahkota's full-sized avatar
:atom:
Learning

Indra Mahkota indramahkota

:atom:
Learning
View GitHub Profile
@indramahkota
indramahkota / build.gradle.kts
Created March 9, 2024 05:25 — forked from adierebel/build.gradle.kts
Proguard + Shadow JAR for non Android Project (Java 11 Swing)
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import proguard.gradle.ProGuardTask
plugins {
id("application")
id("org.jetbrains.kotlin.jvm") version "1.6.0"
id("com.github.johnrengelman.shadow") version "7.1.0"
}
@indramahkota
indramahkota / complex_forwarding_painter.kt
Created November 13, 2023 13:41 — forked from colinrtwhite/complex_forwarding_painter.kt
A painter that wraps another painter to overwrite its color filter, alpha, and/or onDraw.
/**
* Create and return a new [Painter] that wraps [painter] with its [alpha], [colorFilter], or [onDraw] overwritten.
*/
fun forwardingPainter(
painter: Painter,
alpha: Float = DefaultAlpha,
colorFilter: ColorFilter? = null,
onDraw: DrawScope.(ForwardingDrawInfo) -> Unit = DefaultOnDraw,
): Painter = ForwardingPainter(painter, alpha, colorFilter, onDraw)
@indramahkota
indramahkota / delete_git_submodule.md
Created October 14, 2023 16:14 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@indramahkota
indramahkota / github_gpg_key.md
Created September 17, 2023 15:50 — forked from ankurk91/github_gpg_key.md
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@indramahkota
indramahkota / BasicTextFieldWithCursorAtEnd.kt
Created September 14, 2023 17:37 — forked from Zhuinden/BasicTextFieldWithCursorAtEnd.kt
A Compose TextField that initializes the cursor position at the end of the text, rather than the start, when focused without tapping the TextField manually.
/*
* Copyright 2020 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@indramahkota
indramahkota / README.md
Created August 6, 2023 02:27 — forked from BoGnY/README.md
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify
@indramahkota
indramahkota / a_Docker setup.md
Created July 7, 2023 08:54 — forked from Swiss-Mac-User/a_Docker setup.md
Installing SonarQube on Docker and SonarScanner using Homebrew on macOS

Docker setup

Install the Docker UI application for macOS

brew install docker --cask

Open the Docker.app

from /Applications/Docker.app

Go to the Docker Dashboard

Wait until the "Docker Dashboard starting…"-message disappears (= Setup complete)

@indramahkota
indramahkota / rearct-native-app-in-wsl2.md
Created January 21, 2023 14:13 — forked from bergmannjg/rearct-native-app-in-wsl2.md
Building a react native app in WSL2
@indramahkota
indramahkota / init.vim
Created January 4, 2023 03:00 — forked from edrpls/init.vim
My neovim config on WSL/Ubuntu
set shell=/bin/sh
set termguicolors
set number
set ruler
set relativenumber
set cursorline
"set synmaxcol=1000
set clipboard=unnamed
"set list listchars=tab:\ ,eol:¬,trail:
@indramahkota
indramahkota / .zshrc
Created August 7, 2022 05:23 — forked from inhji/.zshrc
zsh aliases
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="lambda-inhji"
# Example aliases