Skip to content

Instantly share code, notes, and snippets.

View pevey's full-sized avatar

Lacey Pevey pevey

View GitHub Profile
@nemedib
nemedib / +layout.svelte
Last active February 14, 2026 10:11
Typed async dialog store for Svelte shadcn dialogs. open() returns a Promise inferred from the dialog component’s close(result) prop. Includes a DialogHost renderer and example usage.
<script lang="ts">
import { DialogStore } from "$lib/context/dialog-store.svelte";
import DialogHost from "$lib/components/ui/dialog/dialog-host.svelte";
import { setContext } from "svelte";
setContext("dialog", new DialogStore());
</script>
<DialogHost />
<script>
import { signOut as authSignOut } from 'sk-auth/client';
import { session } from '$app/stores';
// getting the user from the session store
$: user = $session.user;
function signIn() {
location.assign('/api/auth/signin/cognito?redirect=/');
}
@pineapplemachine
pineapplemachine / mod-manager-2-dracula-bigger-fonts.qss
Last active September 28, 2025 02:38
Light edit of the "dracula.qss" style file included with Mod Organizer v2.2.2.1 to increase font size.
/*
* Drop background color of most widgets
*/
/*
* This is a light edit of the "dracula.qss" style file included with
* Mod Organizer v2.2.2.1.
*
* It increases the font size as well as the height of rows in lists and
* tables and such, making the interface much more readable on my display.
@just-be-dev
just-be-dev / npm-canary.md
Last active August 19, 2024 22:39 — forked from schmich/npm-prerelease.md
Publish a canary package on NPM
  • Update package.json by running yarn version --prerelease --preid=canary
  • Run npm publish --tag canary to publish the package under the canary tag
  • Run yarn add @artsy/reaction@canary to install canary package

Running npm dist-tag ls can be helpful to see what tagged packages are available

@fr-ser
fr-ser / debounce.ts
Last active July 15, 2023 15:12
Typed debounce function wtih TypeScript
export function debounce<F extends Function>(func:F, wait:number):F {
let timeoutID:number;
if (!Number.isInteger(wait)) {
console.warn("Called debounce without a valid number")
wait = 300;
}
// conversion through any necessary as it wont satisfy criteria otherwise
return <any>function(this:any, ...args: any[]) {
@capaj
capaj / module_parent_bar.js
Last active March 11, 2025 17:23
showcase of module.parent
var myFunc = require("./myFunc");
(function bar(){
myFunc("bar message");
})();