Skip to content

Instantly share code, notes, and snippets.

@belgattitude
belgattitude / ci-yarn-install.md
Last active July 23, 2025 05:04
Composite github action to improve CI time with yarn 3+ / node-modules linker.
@hwkr
hwkr / auto-animate.tsx
Created July 27, 2022 17:51
Auto Animate Component
import { ElementType, HTMLAttributes } from "react";
import { useAutoAnimate } from "@formkit/auto-animate/react";
interface Props extends HTMLAttributes<HTMLElement> {
as?: ElementType;
}
export const AutoAnimate: React.FC<Props> = ({
as: Tag = "div",
children,
package com.netflix.temporal.config
import com.fasterxml.jackson.databind.ObjectMapper
import com.netflix.grpc.metatron.NettyMetatronSslContext
import com.netflix.temporal.config.customizers.WorkerFactoryOptionsCustomizer
import com.netflix.temporal.config.customizers.WorkflowClientOptionsCustomizer
import com.netflix.temporal.config.customizers.WorkflowServiceStubsOptionsCustomizer
import com.netflix.temporal.core.WorkerFactoryVisitor
import com.netflix.temporal.spring.ClusterAwareWorkflowClient
import com.netflix.temporal.spring.ClusterAwareWorkflowServiceStubs
@Sv443
Sv443 / DOMRect visualizer.md
Last active May 5, 2025 11:50
Updated version of @mlewand's DOMRect visualisation
@xykong
xykong / k8sdump.sh
Last active August 14, 2025 14:22
Export Kubernetes cluster resource to yaml.
#!/usr/bin/env bash
readonly SCRIPT=$(basename "$0")
readonly VERSION='1.0.0'
readonly AUTHOR='[email protected]'
readonly SOURCE='https://gist.github.com/xykong/6efdb1ed57535d18cb63aa8e20da3f4b'
# For script running robust
set -o nounset # to exit when your script tries to use undeclared variables
set -o errexit # to make your script exit when a command fails
@su79eu7k
su79eu7k / sap_bapi.py
Created April 2, 2021 06:54
SAP BAPI with pyrfc
import pandas as pd
from pyrfc import Connection, ABAPApplicationError, ABAPRuntimeError, LogonError, CommunicationError
class RFC_Handle(object):
def __init__(self):
self.conn = None
def login(self, sap_id, sap_pwd):
try:
@clarkmcc
clarkmcc / main.go
Created March 16, 2021 18:43
Get all filenames inside an Golang embedded filesystem.
func getAllFilenames(fs *embed.FS, path string) (out []string, err error) {
if len(path) == 0 {
path = "."
}
entries, err := fs.ReadDir(path)
if err != nil {
return nil, err
}
for _, entry := range entries {
fp := filepath.Join(path, entry.Name())
@jawabuu
jawabuu / vitess-automigrate.sh
Last active December 30, 2024 08:47
Migrate your existing mysql database into Vitess automatically
#!/usr/bin/env bash
## This installs the Vitess Operator
kubectl kustomize github.com/planetscale/vitess-operator.git/deploy?ref=v2.8.2 | kubectl apply -f -
## This creates your Vitess Cluster
kubectl apply -f vitess-cluster.yml
## Edit vitess-cluster.yml to match your existing db variables and your desired vitess cluster variables.
## In VitessCluster update;
## externalDatastore.user: externalDatastore.host externalDatastore.port & externalDatastore.database
## In the example-cluster-config Secret update;
## external_users.json with your existing mysql user & password
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active September 8, 2025 15:05
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@enepomnyaschih
enepomnyaschih / base64.ts
Last active March 4, 2025 07:49
https://www.npmjs.com/package/byte-base64 - Encode JS Uint8Array, simple array of bytes or native JS string to base64 and back - TypeScript version
/*
MIT License
Copyright (c) 2020 Egor Nepomnyaschih
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is