Skip to content

Instantly share code, notes, and snippets.

View revant's full-sized avatar

Revant Nandgaonkar revant

View GitHub Profile
@revant
revant / README.md
Last active January 25, 2024 14:43
ERPNext Development for beginners

Prerequisites:

  • "git" things to know
    • create app's git repo
    • create fork repo
    • create feature branch
    • send, approve and accept merge request
    • git tags, prepare release script.
    • push release to HEAD branch, e.g version-13, version-12, etc.
  • docker
@revant
revant / mongodb.yml
Created March 25, 2021 09:26
Backing Services for development
version: '3'
services:
db:
image: bitnami/mongodb:latest
restart: always
environment:
- MONGODB_USERNAME=app-data
- MONGODB_PASSWORD=admin
- MONGODB_DATABASE=app-data
@revant
revant / README.md
Last active November 23, 2023 12:11
Frappe Docker development bench in production

Install frappe-bench using docker

Clone frappe_docker

git clone https://github.com/frappe/frappe_docker.git
cd frappe_docker

Install bench using docker

@revant
revant / ganache-cli.docker-compose.yml
Last active March 1, 2021 15:24
ganache-cli docker stack
version: "3.7"
services:
ganache:
image: trufflesuite/ganache-cli:latest
command: -h 0.0.0.0 -p 7545 --db /data
volumes:
- ganache-vol:/data
networks:
- ganache-network
@revant
revant / id-token.guard.ts
Created January 30, 2021 14:32
IdTokenGuard NestJS Guard to verify IdToken using JWKS
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import * as jwt from 'jsonwebtoken';
import * as jwksClient from 'jwks-rsa';
@Injectable()
export class IdTokenGuard implements CanActivate {
canActivate(context: ExecutionContext) {
const ctx = GqlExecutionContext.create(context);
const req = ctx.getContext().req;
@revant
revant / k3d-cluster.md
Last active December 5, 2021 08:46
Commands to install k8s cluster using k3d for local use
  1. Install devcluster, publish ports without traefik.
k3d cluster create devcluster \
  --api-port 127.0.0.1:6443 \
  -p 80:80@loadbalancer \
  -p 443:443@loadbalancer \
  --k3s-arg "--disable=traefik@server:0"

Prerequisites

  • EKS Fargate profiles for <fargate-profile-namespace>. Guide
  • EKS Fargate coredns profile for coredns pods to run (create profile for kube-system namespace, refer guide from previous step)
  • EFS CSI Driver installed, mount points set and pv.yaml created. Refer Guide
  • EKS ALB Controller, refer Guide.

Install Helm

Refer Helm Installation to install helm command

{
"guestFunctions": [
"erpnext.www.book_appointment.verify.index.get_context(context)",
"erpnext.www.book_appointment.index.get_appointment_settings()",
"erpnext.www.book_appointment.index.get_timezones()",
"erpnext.www.book_appointment.index.get_appointment_slots(date, timezone)",
"erpnext.www.book_appointment.index.create_appointment(date, time, tz, contact)",
"erpnext.templates.utils.send_message(subject='Website Query', message='', sender='', status='Open')",
"erpnext.templates.pages.search_help.get_help_results_sections(text)",
"erpnext.templates.pages.product_search.get_product_list(search=None, start=0, limit=12)",
@revant
revant / README.md
Last active July 16, 2022 08:46
Arch Linux on Lenovo IdeaPad 330-15ARR

Required Kernel params

loglevel=3 iommu=pt acpi_backlight=native
  • iommu=pt Solves sudden freeze of graphics Arch Forum Link
  • acpi_backlight=native Solves back light "failed" message during boot Arch Wiki
  • Use it with other params e.g. loglevel=3 iommu=pt acpi_backlight=native apparmor=1 security=apparmor quiet
# Install these packages (use your favorite AUR tool here)
yay -Syu minikube-bin kubectl docker-machine-driver-kvm2 libvirt qemu-headless docker-machine ebtables
# Get libvirt going
sudo systemctl enable libvirtd.service
sudo usermod -a -G libvirt $(whoami)
# This fix thanks to http://blog.programmableproduction.com/2018/03/08/Archlinux-Setup-Minikube-using-KVM/
sudo virsh net-autostart default