Skip to content

Instantly share code, notes, and snippets.

View clandestine8's full-sized avatar
🏠
Working

clandestine8 clandestine8

🏠
Working
View GitHub Profile
@clandestine8
clandestine8 / package.json
Created February 3, 2023 18:41
Vue3 + Tailwind + SASS + Vite with Instant Hot Reload setup using PostCSS Plugin
{
"name": "vue-project",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
@clandestine8
clandestine8 / Caddyfile
Last active August 29, 2024 10:59
Multi App PHP / Laravel Docker Development Environment using Caddy as Reverse Proxy
app.localhost {
tls internal
root * /srv/App/public
php_fastcgi App:9000 {
root /var/www/public
}
file_server
encode gzip
}
@clandestine8
clandestine8 / autophone.js
Created April 4, 2022 19:53
Auto Format North American Phone Numbers in HTML Forms using Vanilla JS
document.addEventListener('DOMContentLoaded', function() {
let tels = document.querySelectorAll('input[type=tel]');
tels.forEach(function (tel) {
if (tel) {
tel.addEventListener('change', function () {
let inputField = this
inputField.value = formatPhoneNumber(inputField.value);
});
tel.addEventListener('keyup', function () {
let inputField = this
@clandestine8
clandestine8 / Production.Dockerfile
Last active July 1, 2024 23:03
UNIT3D Dockerfile - WIP
FROM php:8.1-fpm-alpine
# ENV & Build ARGS
ENV LARAVEL_DIR /var/www
ARG BRANCH=master
WORKDIR ${LARAVEL_DIR}
# Install Deps
RUN apk add --no-cache git sed nginx nodejs npm openssh-client libzip-dev libsodium-dev icu-dev mysql-client supervisor freetype-dev libjpeg-turbo-dev libpng-dev
RUN apk add --no-cache $PHPIZE_DEPS