Skip to content

Instantly share code, notes, and snippets.

View dsileikaarribatec's full-sized avatar

Dovydas dsileikaarribatec

  • Arribatec
View GitHub Profile
#zero downtime deployment nextjs without vercel
echo "Deploy starting..."
git pull
npm install || exit
BUILD_DIR=temp npm run build || exit
@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active November 9, 2024 23:03
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@hlubek
hlubek / nginx.conf
Created August 12, 2021 12:17
Nginx reverse proxy with caching for Next.js with imgproxy
# Based on https://steveholgado.com/nginx-for-nextjs/
# - /var/cache/nginx sets a directory to store the cached assets
# - levels=1:2 sets up a two‑level directory hierarchy as file access speed can be reduced when too many files are in a single directory
# - keys_zone=STATIC:10m defines a shared memory zone for cache keys named “STATIC” and with a size limit of 10MB (which should be more than enough unless you have thousands of files)
# - inactive=7d is the time that items will remain cached without being accessed (7 days), after which they will be removed
# - use_temp_path=off tells NGINX to write files directly to the cache directory and avoid unnecessary copying of data to a temporary storage area first
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=7d use_temp_path=off;
upstream nextjs_upstream {
@erkserkserks
erkserkserks / Fast UTM shared directories using Samba.md
Last active December 20, 2024 02:38
Fast UTM shared directories using Samba

Fast UTM shared directories using Samba

Problem

UTM's shared directory implementation relies on SPICE WebDAV, which is slow.

Solution

Use Samba for faster shared directories. Samba is ~5x faster, see benchmarks at the end.

@Raistlfiren
Raistlfiren / Dockerfile
Last active September 13, 2024 08:29
XDebug 3 and Docker Reference
FROM php:7.4-cli-alpine
# Install xdebug
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del .phpize-deps
WORKDIR /var/www/html
@karlhillx
karlhillx / laravel-8-laravel-mix-6-font-awesome.md
Last active August 25, 2023 14:29
Want to use Laravel 8 and Font Awesome 5? (Regularly updated)

Laravel asset compilation for Laravel 8 + Laravel Mix 6 + Font Awesome 5

This document provides help to get your Laravel 8 instance running with the latest versions of Laravel Mix and Font Awesome.

Laravel Mix
@stormwild
stormwild / vscode-terminal-nvm.md
Last active June 11, 2022 03:10
Visual Studio Code NVM Node Integrated Terminal Issue

Visual Studio Code NVM Node Issue

NVM

Given that nvm is installed on Mac OS X High Sierra or Mojave using the install script

~/.bash_profile

export NVM_DIR="$HOME/.nvm"
@AlexandrFadeev
AlexandrFadeev / reinstall iOS Simulators.txt
Created April 2, 2019 07:23
Reinstall Xcode iOS Simulators
1) Quit Xcode, Simulator, Instruments, etc.
2) Run in Terminal: sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
3) Run in Terminal: sudo rm -rf ~/Library/*/CoreSimulator
# Was tested on Xcode 10.2 and iOS Simulator 12.2
@shov
shov / Dockerfile
Created May 21, 2018 09:36
Docker PHP 7.2 fpm with GD jpg, png suppot
FROM php:7.2-fpm
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# make sure apt is up to date
RUN apt-get update --fix-missing
RUN apt-get install -y curl
RUN apt-get install -y build-essential libssl-dev zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev
@manuelselbach
manuelselbach / README.md
Last active January 28, 2025 01:21
xdebug docker on macOS with PhpStorm

Use xdebug with docker on macOS and PhpStorm

To use xdebug with macOS and docker is quite, let´s call it tricky ;)

The following steps need to be proceed to get it working:

  1. use the config from the xdebug.ini wihtin your docker web container. Important: set remote_connect_back to off

UPDATE