Skip to content

Instantly share code, notes, and snippets.

@belgattitude
belgattitude / ci-yarn-install.md
Last active May 18, 2024 14:15
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 / README.md
Last active October 15, 2022 20:06
Updated version of @mlewand's DOMRect visualisation
@xykong
xykong / k8sdump.sh
Last active January 14, 2024 15:19
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
@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())
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active May 11, 2024 07:03
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 December 22, 2023 08:07
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
@sibelius
sibelius / applyMiddleware.ts
Created April 7, 2020 11:55
trace resolver to generate span for each GraphQL resolver
import { addMiddleware } from 'graphql-add-middleware';
addMiddleware(schema, traceResolveMiddleware);
@random-robbie
random-robbie / install_go_pi.sh
Created April 26, 2018 14:16
Install Go Lang 1.10.1 on Raspberry Pi 3
wget https://storage.googleapis.com/golang/go1.10.1.linux-armv6l.tar.gz
sudo tar -C /usr/local -xvf go1.10.1.linux-armv6l.tar.gz
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.bashrc