Skip to content

Instantly share code, notes, and snippets.

@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 February 16, 2024 12:23
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();
@evoactivity
evoactivity / openvpn_pia
Created January 29, 2023 21:54
How to setup headless (No GUI/CLI Only) ubuntu openvpn pia
## Install OpenVPN
# Now we install and configure OpenVPN, do the following commands:
sudo apt-get install openvpn
cd /etc/openvpn
sudo wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'details',
attributeBindings: ['open'],
open: true,
click(e) {
e.preventDefault();
},
actions: {
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
calculatePosition(trigger, content) {
let { top, left, width, height } = trigger.getBoundingClientRect();
let { height: contentHeight } = content.getBoundingClientRect();
let style = {
left: left + width,