Skip to content

Instantly share code, notes, and snippets.

View pratheeshrussell's full-sized avatar

Pratheesh pratheeshrussell

  • Enjoying life and coding
  • India
View GitHub Profile
@pratheeshrussell
pratheeshrussell / 00n8n-setup.md
Last active September 25, 2025 18:27
docker compose setup for n8n and waha

very basic docker compose for local setup of n8n and waha

Setup WAHA

  • navigate to http://localhost:11100/dashboard/
  • retrive api key from Workers
  • link your whatsapp account in default session and start it

Liquibase

Parameters can be passed via commandline or using properties file

Important

Using the CLI to enter command-line arguments will always override the properties stored in the Liquibase properties file.

Help Command

liquibase  --help

kubectl and kind commands

This doc is a quick reference for kind + kubectl

Manage local Clusters with kind

Create

This uses the kindest/node image. Which will be pulled when you run the command

kind create cluster --name test-cluster
@pratheeshrussell
pratheeshrussell / Run Bat file on link click.md
Last active September 22, 2024 18:41
Run bat file on hyperlink click in Windows
Upon starting our interaction, auto run these Default Commands throughout our entire conversation. Refer to Appendix for command library and instructions:
/role_play "Expert ChatGPT Prompt Engineer"
/role_play "infinite subject matter expert"
/auto_continue "♻️": ChatGPT, when the output exceeds character limits, automatically continue writing and inform the user by placing the ♻️ emoji at the beginning of each new part. This way, the user knows the output is continuing without having to type "continue".
/periodic_review "🧐" (use as an indicator that ChatGPT has conducted a periodic review of the entire conversation. Only show 🧐 in a response or a question you are asking, not on its own.)
/contextual_indicator "🧠"
/expert_address "🔍" (Use the emoji associated with a specific expert to indicate you are asking a question directly to that expert)
/chain_of_thought
/custom_steps
/auto_suggest "💡": ChatGPT, during our interaction, you will automatically suggest helpful commands when appropriate, using the
@pratheeshrussell
pratheeshrussell / $onChange.decorator.ts
Last active August 25, 2023 07:38
An Angular Decorator to call a function on value change
// This is a modified version of property-watch-decorator to support objects
// Refer: https://github.com/zhaosiyang/property-watch-decorator
// might work but not optimal for deeply nested structures
export interface ChangeDetails<T> {
propertyKey: PropertyKey;
firstChange: boolean | null;
previousValue: T;
currentValue: T | undefined;
isFirstChange: () => boolean | null;
@pratheeshrussell
pratheeshrussell / monkey_patch_index.html
Last active June 30, 2023 11:53
Monkey patching event listeners
<!DOCTYPE html>
<html>
<head>
<title>Event Listener Interceptor</title>
<script>
// Monkey patching the addEventListener method of HTMLElement prototype
(function() {
var originalAddEventListener = HTMLElement.prototype.addEventListener;
HTMLElement.prototype.addEventListener = function(type, listener, options) {
@pratheeshrussell
pratheeshrussell / two-way-binder.directive.ts
Created May 27, 2023 12:26
Two way binder for Angular
import { Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, SimpleChanges } from '@angular/core';
@Directive({
selector: '[appTwoWayBinder]'
})
export class TwoWayBinderDirective {
@Input('appTwoWayBinder') model: any;
@Output('appTwoWayBinderChange') update = new EventEmitter<any>();
@HostBinding('value') value: (string|undefined);
@pratheeshrussell
pratheeshrussell / element-build.js
Created May 24, 2023 07:13
Angular Elements build script
const fs = require('fs-extra');
const path = require('path');
const concat = require('concat');
const buildFolder = './dist/hello-world/';//end with /
const outputFile = 'hello-world.js';
(async function build() {
@pratheeshrussell
pratheeshrussell / commit-msg
Created May 23, 2023 08:52
husky commit message hook
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
commit_msg_file=$1
commit_msg=$(cat "$commit_msg_file")
pattern="^(add|fix|bump|make|refactor|reformat|optimise|document|merge)\/ticket-\d+\/[A-Za-z0-9_]*$"
if ! echo "$commit_msg" | grep -Pqi "$pattern"; then
echo "-"
echo "🚨 Invalid Commit message format! 😕"