Skip to content

Instantly share code, notes, and snippets.

View BananaAcid's full-sized avatar

Nabil Redmann BananaAcid

View GitHub Profile
@BananaAcid
BananaAcid / .eslintignore
Last active May 28, 2023 11:32
Nuxt esLint basic setup
dist
node_modules
@BananaAcid
BananaAcid / Extensions used
Last active May 13, 2023 18:20
vscode user settings
vscode.github
vscode.github-authentication
vscode.git
vscode.debug-auto-launch
vscode.markdown-math
vscode.git-base
vscode.merge-conflict
humy2833.ftp-simple
marp-team.marp-vscode
yzhang.markdown-all-in-one
@BananaAcid
BananaAcid / get path.md
Created May 13, 2023 17:04
nuxt fn to create a folder

nuxt.config.ts (config upload path)

export default defineNuxtConfig({
    telemetry: false,

    runtimeConfig: {
        paths: {
            upload: path.join(process.cwd(), '../upload'),  //fs.realpathSync( '../upload') --> will be an error, if it does not exist
            
 }
@BananaAcid
BananaAcid / addMockImageToDropZone.ts
Created April 29, 2023 23:13
add mock images to dropzone
/**
* Add mock images to a DropZone element
*
* @param dropzone ref to dropzone to add the files to
* @param amount the numeber of mock images to add
* @param callback will be called when a file was added (callback has no info param. Better: `.on("thumbnail", (mockFile, thumbnail) => { ... });` ref: https://github.com/dropzone/dropzone/blob/main/src/dropzone.js#L964:L965 )
* @param url url to get the mocjk images from with `%_RAND_%` to force generating different images, default: `https://source.unsplash.com/200x200/?nature,water&%_RAND_%`
*/
function setMockFiles(
dropzone: Dropzone,
@BananaAcid
BananaAcid / readme.md
Last active May 13, 2023 18:22
FormKit right side unit (default is left side)

image

<template>
  
<FormKit
  type="text"
  label="Your username"
 value="calypso"
@BananaAcid
BananaAcid / readme.md
Last active April 2, 2023 12:43
KaboomJS - make replit.com export runnable (Docker, Standalone)

Note: The node_modules folder should be deleted, as it may contain incompatible module versions (not suited for your OS).

  1. Update project info, add the script block, the dependencies should stay as exported by replit (included here for completeness).

File: package.json

{
  "name": "kaboom-env", 
  "scripts": {
@BananaAcid
BananaAcid / readme.md
Created April 2, 2023 11:55
enable vscode param hint

Bildschirm­foto 2023-04-02 um 13 54 18

Bildschirm­foto 2023-04-02 um 13 52 16

{
	"javascript.inlayHints.parameterNames.enabled": "all",
	"javascript.inlayHints.parameterTypes.enabled": true,
	"typescript.inlayHints.parameterNames.enabled": "all",
	"typescript.inlayHints.parameterTypes.enabled": true
@BananaAcid
BananaAcid / XAML.GUI-framework.ps1
Last active July 9, 2023 00:02
Load Visual-Studio generated XAML windows in powershell and attach events
<#
.Synopsis
Loads and shows a window xaml file and attaches handlers as well as providing all elements to be used
.Description
Version 1.0.0
License ISC
(c) Nabil Redmann 2019 - 2023, Powershell 5+ (including pwsh 7)
.Notes
@BananaAcid
BananaAcid / Create-Menu.ps1
Last active January 17, 2023 15:45
Shows strings as a table to be selectable by navigating with arrow keys
Function Create-Menu() {
<#
.SYNOPSIS
Shows strings as a table to be selectable by navigating with arrow keys
.DESCRIPTION
Version 1.0.3
Author: Nabil Redmann (BananaAcid)
License: ISC
@BananaAcid
BananaAcid / _ PowerShellGSM installation script.md
Last active April 13, 2024 23:23
Install PowerShellGSM from commandline without git, and setup basics by prompts (with default options)

PowerShellGSM installation script

Usage

Copy and paste the below one-liner into your powershell console (WIN+R, then "powershell.exe")

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/bananaacid/1dc9117571967b26ceabc972009137ae/raw/install_PowerShellGSM.ps1'))