This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by Kaustubh Patange | |
# Date Modified: 3rd April 2020 | |
# | |
# @Platform: Windows (only) - A Powershell script | |
# | |
# @Summary: We often get into some space issues during coding, especially when you are | |
# doing Android development (native) in Android Studio which exceptionally | |
# creates larger gradle downloads and stuff. This is applicable also for | |
# flutter, Xamarin or even a standard .Net project, etc. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2020 Kaustubh Patange | |
* | |
* 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 | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* If there is two same classes like below one maybe domain & other may be entity | |
* Following method might help to map such instance to other classes. | |
* | |
* This is done completely through reflection by matching parameters name. | |
* | |
* [convertType] This can be used to transform intermediate values if their types are different in other. | |
*/ | |
inline fun <reified F : Any, reified T : Any> mapToClass(from: F, convertType: (String, Any?) -> Any? = { _,v -> v }): T { | |
val args = HashMap<KParameter, Any?>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kpstv.xclipper.extensions | |
import android.content.Intent | |
import androidx.activity.ComponentActivity | |
import androidx.activity.result.ActivityResult | |
import androidx.activity.result.ActivityResultLauncher | |
import androidx.activity.result.contract.ActivityResultContract | |
import androidx.activity.result.contract.ActivityResultContracts | |
import androidx.fragment.app.Fragment | |
import java.util.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A script to recursively delete Slack DM's messages and replies. | |
# | |
# Preparation: | |
# - Create a slack app and install it in your workspace or any channel | |
# - In OAuth & Permissions, add channels:read, chat:write, groups:read, im:read, incoming-webhook, mpim:read, users:read | |
# scopes to both Bot and User Token scopes, you might need to reinstall it in the workspace. | |
# - Get "User OAuth Token". | |
# - pip install requests==2.28.1 termcolor | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A script to recursively delete Slack channel's messages and replies posted by you. | |
# | |
# Preparation: | |
# - Create a slack app and install it in your workspace or any channel | |
# - In OAuth & Permissions, add channels:read, chat:write, groups:read, im:read, incoming-webhook, mpim:read, users:read | |
# scopes to both Bot and User Token scopes, you might need to reinstall it in the workspace. | |
# - Get "User OAuth Token". | |
# - pip install requests==2.28.1 termcolor | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.vimrc | |
" Causes problems with some mappings | |
"source ~/.ideavimrc | |
remap <SPACE> <Nop> | |
let mapleader="\<Space>" | |
""" runtime/defaults.vim | |
set history=200 | |
set showcmd |