Skip to content

Instantly share code, notes, and snippets.

View fimion's full-sized avatar
🦄
I'M A UNICORN!!

Alex Riviere fimion

🦄
I'M A UNICORN!!
View GitHub Profile
@fimion
fimion / server-hot-reload.js
Last active August 18, 2023 20:26 — forked from mikeckennedy/server-hot-reload.js
Server-side hot reload checker by Michael Kennedy. When the contents of the page change in any way, the page will be reloaded.
// *************************************************************************
// Server-side hot reload check by Michael Kennedy (https://mkennedy.codes).
// Released under the MIT open source license, 2023.
//
// Usage: Include this file in your "application shell" layout template
// or directly into any page you'd like to check.
//
// Set the checkIntervalInMs time to the frequency you need. Usually 1 sec
// should be fine, but if a page is slow maybe increase the delay.
//
@fimion
fimion / custom.css
Created December 28, 2022 15:04
Mastodon 4.0.2 hide posts with no alt text
/* hides everything inside the status wrapper */
.item-list>article:has(.media-gallery__item img:not([alt])) .status__wrapper .status *{
display: none;
}
/* lets you know it hid something */
.item-list>article:has(.media-gallery__item img:not([alt])) .status__wrapper .status:after{
content:"Post hidden for lack of alt text"
}
<script>
import AvatarPixels from "./AvatarPixels";
import AvatarBauhaus from "./AvatarBauhaus";
import AvatarMarble from "./AvatarMarble";
import AvatarRing from "./AvatarRing";
import AvatarSunset from "./AvatarSunset";
import AvatarBeam from "./AvatarBeam";
const VARIANTS = ["pixels", "bauhaus", "ring", "beam", "sunset", "marble"];
export default {
components: {
export default function constantMixin(constants={}){
const computed = {};
Object.keys(constants).forEach((key)=>{
computed[key] = ()=>constants[key];
});
return { computed };
}
@fimion
fimion / ClickWait.js
Created January 15, 2021 00:01
Difference in compiled componets
var render = function () {
var _vm=this;
var _h=_vm.$createElement;
var _c=_vm._self._c||_h;
return _c(
'v-btn',
{on:{"click":_vm.clicked}},
[_vm._t("default")],
2
);
@fimion
fimion / justNo.DontDoThis.js
Created February 5, 2020 21:41
Line Indenting 4 or 8 spaces?
function doesThing(thing) {
if (thing.length >= 10 ||
thing.length === 0)
{
doTheThing()
}
}
const ListOfXML = [];
// https://webpack.js.org/guides/dependency-management/#require-context
const requireComponent = require.context(
// Look for files in a directory
'/path/to/xml/files',
// Do not look in subdirectories
false,
// Only include ".xml" files
/.*\.xml$/