Skip to content

Instantly share code, notes, and snippets.

// MIT licensed (© 2024)
// https://opensource.org/license/mit
//
// Source: https://gist.github.com/anthonyjoeseph/6b99beb34d494acd1dfc83a192ed9388/edit
// Original (with bug): https://gist.github.com/gburtini/7e34842c567dd80ee834de74e7b79edd
import fs from "fs";
import config from "../../drizzle.config";
import path from "path";
@belgattitude
belgattitude / ci-yarn-install.md
Last active October 14, 2025 07:43
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 September 23, 2025 17:20
Export Kubernetes cluster resource to yaml.
#!/usr/bin/env bash
readonly SCRIPT=$(basename "$0")
readonly VERSION='1.0.0'
readonly AUTHOR='xy.kong@gmail.com'
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 January 14, 2026 08:24
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.