Skip to content

Instantly share code, notes, and snippets.

View BananaAcid's full-sized avatar

Nabil Redmann BananaAcid

View GitHub Profile
@BananaAcid
BananaAcid / Readme.md
Last active October 5, 2024 20:05
Nuxt module - simple base with auto-import

nuxt module base

A simple start with auto importing the common file types

setup

  1. follow the simple setup at nuxt.com > Modules
  2. copy the other files (at least magicImports.ts, optionally module.ts) from below to auto-import the common filetypes
  3. npm i fast-glob ... is required, as long as node:fs > glob is still experimental

free-space-json-api-server

Expose basic disk usage

{
    "free": 15024480256,
    "available": 15024480256,
    "freePercent": 3.01,
    "warnMin": false,
@BananaAcid
BananaAcid / app.json
Created August 2, 2024 15:48
dokku health check in nuxt
{
"scripts": {
"dokku": {
"predeploy": "cd app && npm install && npm run build"
}
},
"healthchecks": {
"web": [
{
"type": "startup",
@BananaAcid
BananaAcid / vscode user keybindings.json
Created July 26, 2024 08:08
Comment Keybindings for VSCode
[
{ "key": "cmd+shift+7", "command": "editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly" },
{ "key": "cmd+shift+8", "command": "editor.emmet.action.toggleComment",
"when": "editorTextFocus && !editorReadonly" },
]
@BananaAcid
BananaAcid / Readme.md
Created July 18, 2024 21:59
vite disable minify

vite.config.js

in defineConfig

{
    build: {
        minify: false // or "terser" but you need terser installed
    }
}
@BananaAcid
BananaAcid / Readme.md
Last active July 18, 2024 21:25
kaboomjs / kaplay with nuxt
@BananaAcid
BananaAcid / unity_uninstall.ps1
Last active July 13, 2024 07:50
quickly uninstall all unity installations / WIN
ls "C:\Program Files\Unity*\Editor\Uninstall.exe" | % fullname |% { &$_ /S /allusers _="$_" }
# just reinstall the one you need.
# /S is silent
# /allusers make sure it is really uninstalled, and its icon as well for all users
# _ to not unpack the installer or something, at least the uninstall is speed up
# ref: https://nsis-dev.github.io/NSIS-Forums/html/t-66750.html
@BananaAcid
BananaAcid / readme.md
Created June 26, 2024 01:33
NuxtImage : Workaround for: sizes and placeholder attribute do not work in preset from nuxt.config.ts
@BananaAcid
BananaAcid / getInput.ts
Created June 24, 2024 04:16
simple node comanline input
/**
* simple node comanline input
*
* Nabil Redmann <[email protected]>
*
* run: npx --yes tsx getInput.ts
*/
//* Setup
import nodeReadline from 'node:readline';
@BananaAcid
BananaAcid / accordeon.vue
Last active June 19, 2024 22:58
accordion simple logic - Vue3 / Nuxt3 / Vuetify
<!--
Simple accodion
Vuetify: https://vuetifyjs.com/en/components/expansion-panels/
note
VExpandTransition is part of Vuetify, and will animate elements, in this case: that do have v-if or v-show change
This can be replaced with Vue maybe (but animating height to auto is annoying, because it needs extra css):
`transition(name="expand" mode="out-in")` - https://vuejs.org/guide/built-ins/transition