Skip to content

Instantly share code, notes, and snippets.

@ap1969
ap1969 / snapsvg.vue
Created July 22, 2021 09:28
Using snap-svg in Vue 3
<template>
<q-page class="flex flex-center">
<div>
<svg id="svg" width="300" height="300"></svg>
</div>
<svg width="0" height="0">
<pattern
id="pattern"
patternUnits="userSpaceOnUse"
x="0"
@ap1969
ap1969 / tags.model.js
Created September 19, 2021 22:10
Objection.js issue
const { BaseModel } = require('./_basemodel');
const Tags = class extends BaseModel {
static get tableName() {
return 'tags';
}
static get relationMappings() {
const Users = new this.prototype.app.models.Users(this.prototype.app);
@ap1969
ap1969 / CreateTimer.php
Created February 7, 2022 23:48
Filament package issue
<?php
namespace Snackdelayer\Snackdelayer\Resources\TimerResource\Pages;
use Snackdelayer\Snackdelayer\Resources\TimerResource;
use Filament\Resources\Pages\CreateRecord;
use Illuminate\Support\Facades\Log;
class CreateTimer extends CreateRecord
@ap1969
ap1969 / IsValidPassword.php
Created February 17, 2022 16:39
Filament Breezy Sample Rule
<?php
namespace App\Rules;
use Illuminate\Support\Str;
use Illuminate\Contracts\Validation\Rule;
class IsValidPassword implements Rule
{
/**
@ap1969
ap1969 / gist:b2f155a0f46c093ae8061b25f3250661
Created November 15, 2022 10:42 — forked from marcanuy/gist:06cb00bc36033cd12875
The 5,000 Most Frequently Used Domain Name Prefixes and Suffixes
1. my+ 1001. se+ 2001. thedaily+ 3001. empire+ 4001. herb+
2. +online 1002. test+ 2002. giant+ 3002. +cook 4002. +teen
3. the+ 1003. fish+ 2003. survey+ 3003. +deluxe 4003. affordable+
4. +web 1004. hk+ 2004. +conference 3004. +crunch 4004. proto+
5. +media 1005. florida+ 2005. twit+ 3005. michigan+ 4005. +ity
6. web+ 1006. fine+ 2006. pick+ 3006. cars+ 4006. myhome+
7. +world 1007. loan+ 2007. +dvd 3007. +forest 4007. plastic+
8. +net 1008. page+ 2008. cinema+ 3008. yacht+ 4008. +kc
9. go+ 1009. fox+ 2009. desi+ 3009. +wallet 4009. +foot
10. +group 1010. +gift 2010. act+ 3010. +contest 4010. +sup
@ap1969
ap1969 / clipboard-slashes.au3
Created January 17, 2024 22:11
AutoIt script for a tray utility to edit clipboard entry backslashes to forwardslashes
#include <MsgBoxConstants.au3>
#include <TrayConstants.au3>
#include <misc.au3>
Opt("TrayMenuMode", 3)
Opt("TrayOnEventMode", 1)
HotKeySet ( "+!v" , "HitIt") ; SHIFT + ALT + V
BackgroundProcess()
@ap1969
ap1969 / gist:2e6e922d7d988847eb094a2dd1e2c865
Created February 7, 2024 21:41
Bookmarklet to automatically click on Asana's "Show More"
javascript:(function clickElementWithDelay() { var targetElement = document.querySelector('#asana_sidebar > div.SidebarResizableContainer-sidebarWrapper > div > div.CustomScrollbarScrollable.Sidebar-customScrollbarScrollable > div.Scrollable--withCompositingLayer.Scrollable.Scrollable--vertical.CustomScrollbarScrollable-scrollable > div.CustomScrollbarScrollable-content > div > div:nth-child(3) > nav > div:nth-child(2) > div > div.ThemeableRectangularButtonPresentation--isEnabled.ThemeableRectangularButtonPresentation.ThemeableRectangularButtonPresentation--medium.SubtleButton--inverseTheme.SubtleButton.SidebarProjectsSectionProjectList-showMoreButton'); if (targetElement) { targetElement.click(); setTimeout(clickElementWithDelay, 250); } })();