Skip to content

Instantly share code, notes, and snippets.

View roguesherlock's full-sized avatar
:shipit:

Akash roguesherlock

:shipit:
View GitHub Profile
@Nezteb
Nezteb / elixir-language-server-comparison.md
Last active July 8, 2024 01:28
Elixir Language Server Comparisons

Elixir Language Server Implementation Comparison

We'll be comparing the following:

Disclaimers:

@Hebilicious
Hebilicious / cloudflare-pages-bun.env
Last active June 2, 2024 20:48
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 July 22, 2024 04:49
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 July 22, 2024 15:06
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>
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@jiffyclub
jiffyclub / conda.fish
Last active December 8, 2021 08:46
Activate and deactivate commands for working with conda environments in the fish shell. Currently assumes you are switching to a named environment, not specifying a directory.
function condalist -d 'List conda environments.'
for dir in (ls $HOME/miniconda3/envs)
echo $dir
end
end
function condactivate -d 'Activate a conda environment' -a cenv
if test -z $cenv
echo 'Usage: condactivate <env name>'
return 1