Skip to content

Instantly share code, notes, and snippets.

View comdotlinux's full-sized avatar
😉
Web Components, Quarkus and GraalVM

Guruprasad Kulkarni comdotlinux

😉
Web Components, Quarkus and GraalVM
View GitHub Profile
@comdotlinux
comdotlinux / github.yaml
Last active February 3, 2023 13:09
My (hopefully) Collection of afx (https://github.com/b4b4r07/afx) config for the tools I like to use
github:
- name: b4b4r07/enhancd
description: A next-generation cd command with your interactive filter
owner: b4b4r07
repo: enhancd
plugin:
env:
ENHANCD_FILTER: fzf --height 25% --reverse --ansi:fzy
sources:
- init.sh
@comdotlinux
comdotlinux / settings.gradle.kts
Created November 26, 2022 21:03
Enabling Gradle Build Scans
plugins {
id("com.gradle.enterprise") version("3.10.1") // https://plugins.gradle.org/plugin/com.gradle.enterprise
}
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
capture {
isTestLogging = true
isBuildLogging = true
@comdotlinux
comdotlinux / build.gradle.kts
Created November 26, 2022 19:28
Get the Output of an External Command into an variable for further use.
import java.io.ByteArrayOutputStream
tasks.register("gitCommit") {
group = "com.linux"
description = "Get The last git commit"
doLast {
val output = ByteArrayOutputStream().let { os ->
exec {
commandLine("/usr/bin/git rev-parse --verify HEAD".split(" "))
standardOutput = os
@comdotlinux
comdotlinux / build.gradle.kts
Created November 26, 2022 18:36
A confirmation Dialog From WIthin Gradle.
import javax.swing.JOptionPane
tasks.register("askConfirmation") {
doLast {
if (confirmation("Do you want to answer me?")) {
logger.lifecycle("😃 You Answered Yes!!!!")
} else {
logger.lifecycle("😒 You Answered No 🤷")
}
@comdotlinux
comdotlinux / build.gradle.kts
Created November 26, 2022 00:26
Simple External Command Execution Using Gradle
tasks.register("runBuild") {
group = "com.linux"
description = "Trigger Build Execution On Github Actions"
doLast {
val command = """gh workflow run build.yaml --ref master --field version=0.0.1"""
exec {
logger.lifecycle("Running Command $command")
commandLine = command.split(" ")
logger.lifecycle("Command executed.")
}
@comdotlinux
comdotlinux / asdf-update.sh
Created October 10, 2022 14:39
A Shell script to find and update tools in .tool-versions from asdf
#!/usr/bin/env bash
SCRIPT_PATH=$(dirname "$0")
echo "-- adding plugins --"
grep -v '^ *#' < "$SCRIPT_PATH/.tool-versions" | while IFS= read -r line
do
asdf plugin add "$(echo "$line" | awk '{print $1}')"
done
@comdotlinux
comdotlinux / .tmux.conf
Last active October 10, 2022 00:15
tmux config file
# for ubuntu
#source /usr/share/powerline/bindings/tmux/powerline.conf
#for fedora
source "/usr/share/tmux/powerline.conf"
## Common, I hope
source /usr/share/byobu/keybindings/tmux-screen-keys.conf
set-option -g default-terminal "screen-256color"
@comdotlinux
comdotlinux / check.sh
Last active April 22, 2022 08:09
Munich Drivers Licence Appointment availability Checker
#!/bin/bash
function getAppointmentInfoJson() {
PHP_SESSION_ID=$(curl -sSL -D - 'https://terminvereinbarung.muenchen.de/fs/termin/index.php?loc=FS' -o /dev/null | awk -F: '/Set-Cookie/{print $2}' | awk -F= '{print $2}' | awk -F\; '{print $1}')
curl -sSL 'https://terminvereinbarung.muenchen.de/fs/termin/index.php?loc=FS' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8,mr;q=0.7,de;q=0.6' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/x-www-form-urlencoded' \
@comdotlinux
comdotlinux / index.html
Created March 13, 2021 16:09
Typing Effect Using Only CSS
<!DOCTYPE html>
<html>
<head>
<title>Typing Effect</title>
</head>
<!--https://codewithbishal.com/example/how-to-create-animated-typing-effect-using-css-->
<body>
<ul class="dynamic-text">
<li><span>Front End Dev</span></li>
<li><span>Back End Dev</span></li>
@comdotlinux
comdotlinux / README.md
Last active February 28, 2021 22:13
Create Github Secrets when you are not the owner and dont have access from the UI

Create Github Secrets

  • Needs python >= 3.6 (uses f strings)
  1. Create a python virtual environment
  2. python3 -m venv .venv
  3. source .venv/bin/activate
  4. Create the two files, requirements.txt and github_create_secret.py in this directory (being in this directory is not necessary but eases documentation)
  5. Install required dependencies
  6. pip install -U pip