Skip to content

Instantly share code, notes, and snippets.

@evoactivity
evoactivity / request.gts
Created November 11, 2026 10:19
<Request /> with loading threshold and minimum time
/* eslint-disable ember/template-no-yield-only -- drawing its blocks is all this component does */
/*
* Ported from WarpDrive v5.9.1, warp-drive-packages/ember/src/-private/request.gts
* (https://github.com/warp-drive-data/warp-drive), MIT licence, Copyright (c) 2017-2025
* Ember.js and contributors. @loadingThreshold and @minimumLoading are our own; the
* request is still followed by WarpDrive's RequestSubscription, which does the
* autorefresh, retry and refresh.
*/
import Component from '@glimmer/component';
import type { TOC } from '@ember/component/template-only';
const thing = <template>
<div>Hello</div>
</template>
const another = <template>
<thing />
</template>
<template>
<thing />
{"label":"coverage","message":"92.12%","schemaVersion":1,"color":"hsl(101, 100%, 40%)"}
@evoactivity
evoactivity / webp-mp4.sh
Created March 3, 2026 01:53
Animated WebP to MP4
#!/bin/bash
# ─── ANSI color codes ────────────────────────────────────────
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
MAGENTA='\033[0;35m'
CYAN='\033[0;36m'
BOLD='\033[1m'
@evoactivity
evoactivity / @ember-eui__core.patch
Last active February 10, 2025 13:21
ember-eui fix
diff --git a/dist/_app_/utils/accesibility/accessible-click-keys.js b/dist/_app_/utils/accesibility/accessible-click-keys.js
deleted file mode 100644
index 9a8d342bfdd5eb7bb846d936cf9dbdebbaf3f2d0..0000000000000000000000000000000000000000
diff --git a/dist/_app_/utils/accesibility/cascading-menu-keys.js b/dist/_app_/utils/accesibility/cascading-menu-keys.js
deleted file mode 100644
index bda2478b4a5464ea12a24c014821bbf2514b7cc1..0000000000000000000000000000000000000000
diff --git a/dist/_app_/utils/accesibility/combo-box-keys.js b/dist/_app_/utils/accesibility/combo-box-keys.js
deleted file mode 100644
index fe5d1c462d311f2974a5c1b88097e39971c5eabb..0000000000000000000000000000000000000000
diff --git a/dist/_app_/utils/accesibility/index.js b/dist/_app_/utils/accesibility/index.js
@evoactivity
evoactivity / detect.sh
Created January 4, 2025 07:06
Batch detect video orientation
#!/bin/bash
set -euo pipefail
usage() {
echo -e "This script will use ffprobe to detect the orientation of a video file and will output the findings as specified by the options.
Usage: $0 [directory] [OPTIONS]
If no directory is specified, the current directory will be used.
@evoactivity
evoactivity / export.gjs
Last active March 14, 2024 22:04
export default gjs
<template>
<textarea>{{current}}</textarea>
</template>
@evoactivity
evoactivity / export.gts
Last active March 14, 2024 23:11
undeclared default export
<template>
<textarea>{{current}}</textarea>
</template>
@evoactivity
evoactivity / history-location.d.ts
Last active March 27, 2026 19:35
Eager loading urls for Ember & trailing slash
import EmberObject from '@ember/object';
declare module '@ember/routing/history-location' {
// More info about interface over here - https://github.com/emberjs/ember.js/blob/v3.28.1/packages/%40ember/-internals/routing/lib/location/api.ts
export default class HistoryLocation extends EmberObject {
protected history: History;
replaceURL(url: string): void;
setURL(path: string): void;
getURL(): string;
formatURL(url: string): string;
@evoactivity
evoactivity / dedupe.ts
Created February 17, 2023 16:32
Deduplicate Git Ignore (.gitignore)
/**
* Remove duplicates from .gitignore
*
* This function reads the .gitignore file, removes duplicates, and overwrites the gitignore file.
*
* @param pathToLocalRepo - Path to the local git repository. Default is the current working directory.
*/
async function dedupeGitIgnore(pathToLocalRepo: string | null = null): Promise<void> {
if (!pathToLocalRepo) {
pathToLocalRepo = Deno.cwd();