Skip to content

Instantly share code, notes, and snippets.

View roguesherlock's full-sized avatar
:shipit:

Akash roguesherlock

:shipit:
View GitHub Profile
@vecerek
vecerek / enterprise-patterns-and-conventions-with-effect.md
Last active February 10, 2025 19:52
Enterprise Design Patterns for Effect

Motivation and Objectives

Enterprise software often has more non-functional requirements to fulfill because of the nature of the business of large companies. Think about it! Large companies often buy smaller ones. When that happens, some integration work of the two companies is imminent. Very often the case is that there is a mismatch between the acquiring and the acquired company's software stack. For example:

  • cloud provider and/or other software hosting solutions
  • tech stack
  • tech standards (secrets injected into the FS vs. read from the network at boot time)
  • etc.
@OrionReed
OrionReed / dom3d.js
Last active April 18, 2025 08:15
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@Nezteb
Nezteb / elixir-language-server-comparison.md
Last active March 5, 2025 17:05
Elixir Language Server Comparisons
@Hebilicious
Hebilicious / cloudflare-pages-bun.env
Last active April 17, 2025 05:03
Cloudflare Pages and Bun
# Bun is now officially supported and these environments variables are no longer needed. Keeping this gist for legacy purposes.
# SKIP_DEPENDENCY_INSTALL=true
# UNSTABLE_PRE_BUILD=asdf install bun latest && asdf global bun latest && bun i
@samselikoff
samselikoff / settings.json
Created August 11, 2023 15:53
Dracula customizations using Tailwind Slate
{
"workbench.colorCustomizations": {
"editor.background": "#0f172a",
"menu.background": "#0f172a",
"sideBar.background": "#0b111e",
"banner.background": "#0f172a",
"tab.inactiveBackground": "#0b111e",
"tab.activeBackground": "#0f172a",
"titleBar.activeBackground": "#0b111e",
"editor.lineHighlightBorder": "#ff000000"
@alexedwards
alexedwards / Makefile
Last active April 14, 2025 04:22
Boilerplate Makefile for Go projects
# Change these variables as necessary.
main_package_path = ./cmd/example
binary_name = example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
import { z } from "zod";
import { zodToTs, printNode } from "zod-to-ts";
// Replace with your `openai` thing
import { openai } from "../openai.server";
import endent from "endent";
function createJSONCompletion<T extends z.ZodType>({
prompt,
schema_name,
@pesterhazy
pesterhazy / building-sync-systems.md
Last active April 16, 2025 11:29
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

import * as React from "react";
import { useMousePosition } from "~/hooks/useMousePosition";
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) {
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {};
const [mouseX, mouseY] = useMousePosition();
const positions = { x, y, h, w, mouseX, mouseY };
return (
<div
@michyprima
michyprima / LayoutModification.xml
Created January 5, 2018 22:21
Make Windows 10 non-LTSB bareable (dism stuff is for 1709)
<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>