Skip to content

Instantly share code, notes, and snippets.

@aradalvand
aradalvand / DockerfileForSvelteKit.md
Last active July 7, 2024 15:04
Dockerfile and .dockerignore for SvelteKit:

*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.

Dockerfile:

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
@sinbad
sinbad / backup_gitea.sh
Created August 9, 2020 14:58
My Gitea Backup & Restore Scripts
#!/bin/bash
# `gitea dump` doesn't currently back up LFS data as well, only git repos
# It primarily backs up the SQL DB, and also the config / logs
# We'll backup like this:
# * "gitea dump" to backup the DB and config etc
# * tar / bzip all the repos since they will be skipped
# * Not rotated because git data is immutable (normally) so has all data
# * rsync LFS data directly from /volume/docker/gitea/git/lfs
# * No need for rotation since all files are immutable
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 23, 2024 00:25
set -e, -u, -o, -x pipefail explanation
@fernandoaleman
fernandoaleman / apache-503-proxy.md
Last active April 16, 2022 21:04
Solving Apache 503 “Service temporarily unavailable” proxy timed out

Error

[Tue Jun 03 22:05:51 2014] [error] (110)Connection timed out: proxy: HTTP: attempt to connect to 127.0.0.1:3000 (127.0.0.1) failed
[Tue Jun 03 22:05:51 2014] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
[Tue Jun 03 22:05:52 2014] [error] proxy: HTTP: disabled connection for (127.0.0.1)
[...]

The problem is that the Apache proxy module, recognising that the service was unavailable, stopped redirecting requests to it for one minute.

@beatfactor
beatfactor / install_nginx_macos_source.md
Last active June 27, 2024 10:13
Install Nginx on Mac OS from source (without brew)

Install Nginx on Mac OS from source

no Homebrew required

1. Download Nginx

$ cd /usr/local/src
$ curl -OL http://nginx.org/download/nginx-1.12.2.tar.gz
$ tar -xvzf nginx-1.12.2.tar.gz && rm nginx-1.12.2.tar.gz
@noelboss
noelboss / git-deployment.md
Last active July 16, 2024 09:50
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@thiloplanz
thiloplanz / Zero_knowledge_db.md
Last active July 15, 2024 11:26
Zero-knowledge databases

Zero knowledge databases

The idea

The idea is to provide a database as a service to end users in such a way that no one except the user herself can access the data, not even the hosting provider or the database administrator.

Advantages

  • A privacy- and/or security-conscious user will have more trust in such a setup.
  • The service provider cannot be coerced to release the data they were trusted with, and he cannot be held responsible for the content he is storing.