Skip to content

Instantly share code, notes, and snippets.

View chojnicki's full-sized avatar

Łukasz Chojnicki chojnicki

View GitHub Profile
@jgerigmeyer
jgerigmeyer / click-outside.ts
Last active November 14, 2023 12:22
v-click-outside directive for Vue 3
/**
* Modified for Vue 3 from https://github.com/ndelvalle/v-click-outside
* Cf. https://github.com/ndelvalle/v-click-outside/issues/238
*/
import { DirectiveBinding, ObjectDirective } from 'vue';
const HANDLERS_PROPERTY = '__v-click-outside';
const HAS_WINDOWS = typeof window !== 'undefined';
const HAS_NAVIGATOR = typeof navigator !== 'undefined';
@DreaMinder
DreaMinder / A Nuxt.js VPS production deployment.md
Last active July 13, 2024 13:46
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.

UPD: This manual now compatible with nuxt@2.3. For older versions deployment, see revision history.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

@digitalkreativ
digitalkreativ / lumen-5-2-storage-facade-and-s3-storage.md
Last active May 15, 2022 07:21
Lumen 5.2 Storage facade and s3 storage #lumen

Lumen 5.2 Storage facade

To enable the Storage facade in Lumen 5.2 you need to modify a few things.

Filesystem configuration file

First of all you need to create a filesystems.php in a config folder.

The config folder needs to be at the same level as your app and bootstrap folder. If it's not there yet just create it.