Skip to content

Instantly share code, notes, and snippets.

View gelbehexe's full-sized avatar

Deborah White gelbehexe

View GitHub Profile
@gelbehexe
gelbehexe / .dockerignore
Last active July 17, 2023 17:12
Gist to setup a simple php cli docker machine with latest php version
.DS_Store
README.md
run.sh
tmp/**
@gelbehexe
gelbehexe / tmux.sh
Last active July 2, 2022 10:13
tmux bash alias respectively function
# to store in '.bashrc.d/tmux.sh' or somewhere else in '.bashrc'
tx() {
if [[ -z "$1" ]]; then
echo "Missing session name"
return 1;
fi
tmux a -t "$1" || tmux new -s "$1"
}
alias txls="tmux ls"
@gelbehexe
gelbehexe / mountOneDrive.sh
Created October 27, 2021 11:32
rclone mount script for onedrive
#!/bin/bash
rcloneTmpPid="$(dirname "$(mktemp -u)")/rclone.${USER}.pid"
target="${HOME}/mnt/OneDrive"
function mountIt() {
local pid rc
mkdir -p "$target" || exit 1
rclone mount --vfs-cache-mode writes --allow-non-empty OneDrive: "$target" &
@gelbehexe
gelbehexe / ClickAwayTester.vue
Last active June 4, 2021 10:31
Vue 3 useClickAway(composition api)
<template>
<div class="bg-gray-200 w-screen min-h-screen h-full py-4">
<div
class="w-full sm:max-w-screen-sm md:max-w-screen-md mx-auto p-6 bg-gray-50 space-y-5"
>
<h1 class="my-2 text-center text-2xl font-bold">
Click Away Demo
</h1>
<a
href="#"
@gelbehexe
gelbehexe / layout.blade.php
Last active April 10, 2021 13:23
Generate an media breakpoint indicator bar for development
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My Title</title>
...
</head>
<body>
...
@gelbehexe
gelbehexe / ExampleCompontent.vue
Last active February 8, 2021 15:29
config function for usage in vue/vuex 3 (like in laravel)
<template>
<div>
<h1>{{ pageTitle }}</h1>
</div>
</template>
<script>
import useConfig from "../composition/useConfig"
// vue 2
@gelbehexe
gelbehexe / TYPO3.flashMessage.php
Last active July 2, 2020 14:50
How to generate a flash message in TYPO3 6.x+
<?php
....
// creating the message
/** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
$message = GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
'Falscher Fehler',
'',
\TYPO3\CMS\Core\Messaging\FlashMessage::WARNING