Skip to content

Instantly share code, notes, and snippets.

View adyanth's full-sized avatar
🎓
Learning stuff

Adyanth Hosavalike adyanth

🎓
Learning stuff
View GitHub Profile
@adyanth
adyanth / Dockerfile
Created April 12, 2023 01:00
Scheduled Stress all nodes in K8s
FROM alpine
RUN apk add stress-ng
ENTRYPOINT ["stress-ng"]
@adyanth
adyanth / darkdrone.js
Created February 9, 2023 07:30
DroneCI UI dark mode
javascript:(function () {
if (document.getElementsByTagName("head")[0].textContent.includes("Drone")) {
var style = document.createElement('style'),
styleContent = document.createTextNode('html{filter:invert(.85)}[class^=\"sidebar_wrapper\"],[class^=\"log-view\"]{filter:invert(1)}');
style.appendChild(styleContent);
document.getElementsByTagName('head')[0].appendChild(style);
} else {
window.location = "https://drone.domain.com/";
}
})();
@adyanth
adyanth / gncaToJson.py
Created October 27, 2022 04:22
Import GNUCash gnca exports in FireflyIII
from lxml import etree
from datetime import datetime as dt
def parseTwo(node, n, key1, key2, tup=False):
ns = {"namespaces": node.nsmap}
_key1 = node.find(f"{n}:{key1}", **ns).text
_key2 = node.find(f"{n}:{key2}", **ns).text
return {_key1: _key2} if not tup else (_key1, _key2)
def parseCommodity(node, tup=False):
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Adyanth Hosavalike",
"label": "Software Development Engineer",
"image": "https://adyanth.dev/images/dp.webp",
"email": "me@adyanth.dev",
"phone": "+1 (858) 933-7214",
"url": "https://adyanth.site/",
"summary": "A passionate software engineer and tech enthusiast with profound knowledge in the field of computer programming, software architecture and networking and a developed sense of inquisitiveness in the Linux kernel and orchestration.",
@adyanth
adyanth / docker-image-ci.yml
Created June 28, 2022 13:45
Automatically discover and build Dockerfiles with different tags
name: Docker Image CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
@adyanth
adyanth / minica.py
Last active December 31, 2023 15:16
Mini CA using Python `cryptography` module
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography import x509
from cryptography.hazmat.primitives import hashes
from cryptography.x509.oid import NameOID
import datetime
from base64 import b64encode
from typing import Tuple, List
@adyanth
adyanth / Dockerfile
Created July 14, 2021 10:08
Filite on Docker
FROM ubuntu
RUN apt update && apt install wget unzip expect socat -y
WORKDIR /filite
RUN wget https://github.com/raftario/filite/releases/latest/download/Linux.zip && \
unzip Linux.zip && \
rm Linux.zip && \
mv Linux/filite . && \
@adyanth
adyanth / docker-compose.yml
Last active June 28, 2022 13:47
Mongo Express
version: "3.8"
services:
mongo-db:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root_password
mongo-ui:
image: mongo-express