Skip to content

Instantly share code, notes, and snippets.

View kanglicheng's full-sized avatar
🦜
LLMs ftw

Kang-Li (Stephen) Cheng kanglicheng

🦜
LLMs ftw
View GitHub Profile
@dgeb
dgeb / queries.ts
Last active March 2, 2022 20:50
React hooks for Orbit.js
import type {QueryOrExpressions, RequestOptions} from '@orbit/data';
import {RecordQueryBuilder, RecordQueryExpression} from '@orbit/records';
export type QueryDispatch = (
queryOrExpressions: QueryOrExpressions<
RecordQueryExpression,
RecordQueryBuilder
>,
queryOptions?: RequestOptions,
queryId?: string,
type A = {
value: string;
};
type B = {
value: string;
};
function my_func(a: A): string {
return a.value;
}
my_func({value: "hi"}); // no error here!
---- Minecraft Crash Report ----
// Why did you do that?
Time: 12/9/21 9:41 PM
Description: Initializing game
java.lang.RuntimeException: Could not execute entrypoint stage 'client' due to errors, provided by 'doorsofinfinity'!
at Not Enough Crashes deobfuscated stack trace.(1.16.5+build.10)
at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:53)
at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:36)
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created December 10, 2021 03:41
Rimworld output log published using HugsLib
Log uploaded on Friday, December 10, 2021, 11:41:16 AM
Loaded mods:
Harmony(brrainz.harmony)[mv:1.1.1.0]: 0Harmony(2.1.1), HarmonyMod(1.1.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
HugsLib(UnlimitedHugs.HugsLib)[ov:9.0.1]: 0Harmony(av:2.1.1,fv:1.2.0.1), HugsLib(av:1.0.0,fv:9.0.1)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Vanilla Expanded Framework(OskarPotocki.VanillaFactionsExpanded.Core): CompOversizedWeapon(1.0.0), ExplosiveTrailsEffect(1.0.7140.31563), HeavyWeapons(1.0.0), KCSG(1.1.1.3), MVCF(1.0.0), NoCamShakeExplosions(1.0.0), OPToxic(1.0.0), Outposts(1.0.0), RecipeInheritance(1.0.0), Reloading(1.1.0), RRO(1.0.0), SmokingGun(1.0.0), VanillaStorytellersExpanded(1.0.0), VanillaWeaponsExpandedLaser(1.0.0), VFECore(av:1.1.7,fv:1.1.9), VWEMakeshift(1.0.0)
Vanilla Expanded - Royalty Patches(OskarPotocki.VanillaExpanded.RoyaltyPatches)[mv:1.1.2.0]: (no assemblies)
Vanilla Expanded - Ideology Patches(OskarPotocki.VanillaExpanded.IdeologyPatches): VEIP(1
aarch64-linux matterbridge
x86_64-darwin matterbridge
i686-linux matterbridge
x86_64-linux matterbridge
import java.util.Arrays;
// Cloneable is a marker interface
class Address implements Cloneable {
public String streetName;
public int houseNumber;
public Address(String streetName, int houseNumber)
@helioalb
helioalb / system_design.md
Last active September 5, 2023 00:40
System design
@karpolan
karpolan / .prettierrc.js
Last active April 5, 2025 14:30
Prettier config for React App
module.exports = {
printWidth: 120, // max 120 chars in line, code is easy to read
useTabs: false, // use spaces instead of tabs
tabWidth: 2, // "visual width" of of the "tab"
trailingComma: 'es5', // add trailing commas in objects, arrays, etc.
semi: true, // add ; when needed
singleQuote: true, // '' for stings instead of ""
bracketSpacing: true, // import { some } ... instead of import {some} ...
arrowParens: 'always', // braces even for single param in arrow functions (a) => { }
jsxSingleQuote: false, // "" for react props, like in html
@syJSdev
syJSdev / react-tic-tac-toe.js
Created November 4, 2020 02:59
Tic Tac Toe game built with React.js
import React from "react";
import ReactDOM from "react-dom";
const rowStyle = {
display: "flex",
};
const squareStyle = {
width: "60px",
height: "60px",