Skip to content

Instantly share code, notes, and snippets.

View FlatMapIO's full-sized avatar
😭
Focusing

dong.huo FlatMapIO

😭
Focusing
View GitHub Profile
'''
https://gist.github.com/kohya-ss/3f774da220df102548093a7abc8538ed
1. put this file in ComfyUI/custom_nodes
2. load node from <loaders>
'''
import torch
from comfy.ldm.modules.diffusionmodules.openaimodel import forward_timestep_embed, timestep_embedding, th
def apply_control(h, control, name):
"use strict";
import type { LexicalEditor, LexicalNode } from "Lexical";
import type { Binding, Provider } from "LexicalYjs";
import {
createBinding,
syncLexicalUpdateToYjs,
syncYjsChangesToLexical,
} from "LexicalYjs";
import {createEditor} from 'Lexical';
import {createBinding, syncYjsChangesToLexical} from 'LexicalYjs';
import {Doc, applyUpdate} from 'yjs';
export default function exportYDoc(
yDocState: Uint8Array,
nodes: Array<Class<LexicalNode>>,
): SerializedEditorState {
const emptyFunction = () => {};
@zaripych
zaripych / typeFootprint.ts
Last active June 24, 2024 00:16
ts-morph type footprint
import {
Project,
Type,
Symbol,
SymbolFlags,
Signature,
Node,
TypeFormatFlags,
} from 'ts-morph';
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active July 15, 2024 05:12
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@norio-nomura
norio-nomura / build-package.sh
Created December 13, 2015 03:13
Script For Building OSX Installer Package of Swift-2.2-SNAPSHOT
#!/usr/bin/env bash
[ ! -x swift/utils/build-script ] && exit 1
SNAPSHOT_DATE=`date "+%Y-%m-%d"`
HASH_LLVM=`(cd llvm;git rev-parse --short HEAD)`
HASH_CLANG=`(cd clang;git rev-parse --short HEAD)`
HASH_SWIFT=`(cd swift;git rev-parse --short HEAD)`
HASH_INFO="LLVM ${HASH_LLVM}, Clang ${HASH_CLANG}, Swift ${HASH_SWIFT}"
BUNDLE_IDENTIFIER="io.nor.swift.${SNAPSHOT_DATE}" # "CFBundleIdentifier for xctoolchain info plist"

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

(require '[clojure.core.async :as a])
(def xform (comp (map inc)
(filter even?)
(dedupe)
(flatmap range)
(partition-all 3)
(partition-by #(< (apply + %) 7))
(flatmap flatten)
(random-sample 1.0)