Skip to content

Instantly share code, notes, and snippets.

View gurukulkarni's full-sized avatar
😅
Focusing

Guruprasad Kulkarni gurukulkarni

😅
Focusing
View GitHub Profile
@gurukulkarni
gurukulkarni / aws-cred.sh
Created November 8, 2023 11:12
A Simple bash script to accept a code from user interactively for AWS 2FA TOTP
#!/bin/bash
read -r -p "Enter OTP for AWS: " TOKEN_CODE
# Change below for you user and account and profile
MFA_ARN=arn:aws:iam::xxxxxxxxxxxxx:mfa/AwsUserName
PROFILE=xxxxx
DURATION=43200
TMP_FILE=/tmp/aws-creds
CREDENTIALS_FILE=~/.aws/credentials
trap "rm -fv $TMP_FILE" EXIT
@gurukulkarni
gurukulkarni / notes.txt
Last active December 3, 2021 16:51
Invitation And Invitation Acceptance
killer use cases
--- action
-> error handling
-> single action for all invites / acceptance
--- Direct Data Access
-> testability
CREATE:: -->
A Mutation Action that authenticated person call that then writes to company_invitation / zone_invitation (create permission view +/ log?)
@gurukulkarni
gurukulkarni / DefaultRouter.kt
Created October 7, 2020 14:38 — forked from dvas0004/DefaultRouter.kt
A clear, simple example of multipart file upload using Reactive Spring (http://blog.davidvassallo.me/2018/07/09/reactive-spring-webflux-multipart-file-upload/)
package com.example.FileUploadExample
import com.example.FileUploadExample.HomeHandler
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.http.MediaType
import org.springframework.web.reactive.function.server.HandlerFunction
import org.springframework.web.reactive.function.server.RequestPredicates
import org.springframework.web.reactive.function.server.RouterFunction
import org.springframework.web.reactive.function.server.RouterFunctions
@gurukulkarni
gurukulkarni / gnupg_scdaemon.md
Created July 10, 2020 15:04 — forked from artizirk/gnupg_scdaemon.md
OpenPGP SSH access with Yubikey and GnuPG

OpenPGP SSH access with Yubikey and GnuPG

Yubikey, Smart Cards, OpenSC and GnuPG are pain in the ass to get working. Those snippets here sould help alleviate pain.

Yubikey Config under Ubuntu

To reset and disable not used modes on Yubikey you need the ykman program

You can install it using those commands

@gurukulkarni
gurukulkarni / Dockerfile
Created December 16, 2019 13:55 — forked from remarkablemark/Dockerfile
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
apiVersion: v1
kind: ConfigMap
metadata:
name: prom-k8s
data:
prometheus.yml: |+
scrape_configs:
- job_name: 'quarkus'
scrape_interval: 15s
scrape_timeout: 10s
@gurukulkarni
gurukulkarni / download_sentry_data.py
Created June 4, 2019 13:15 — forked from bubenkoff/download_sentry_data.py
Download all sentry events for a project. Useful for data processing
"""Download sentry data.
usage:
python download_sentry_data.py <org>/<project> <api_key>
"""
import requests
import csv
@gurukulkarni
gurukulkarni / CaseInsensitiveSubstringMatcher.java
Created July 28, 2018 21:28 — forked from spuklo/CaseInsensitiveSubstringMatcher.java
Case insensitive substring hamcrest matcher. I've found myself needing such matcher at least 3 times recently, so maybe someone else will also find it useful.
import org.hamcrest.Description;
import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
public class CaseInsensitiveSubstringMatcher extends TypeSafeMatcher<String> {
private final String subString;
private CaseInsensitiveSubstringMatcher(final String subString) {
@gurukulkarni
gurukulkarni / .credentials
Created February 14, 2018 14:02 — forked from vrischmann/.credentials
Running SBT with a Nexus proxy with authentication
realm=Sonatype Nexus Repository Manager
host=nexus.company.com
user=admin
password=admin123