Skip to content

Instantly share code, notes, and snippets.

View rjl6789's full-sized avatar

Rob rjl6789

  • England
View GitHub Profile
@JamesCullum
JamesCullum / immich-docker-config.md
Last active March 28, 2024 04:30
docker-compose.yml for immich with WAF, DDoS protection, image resizing and without port forwarding

Setup Immich via Docker Compose with WAF, CDN, DDoS protection, no port forwarding and automated image resizing

In this guide, we are using the docker compose setup that is recommended by the Immich team. Once everything is configured and running in your local network, we can expand on it.

The first recommended step is to use Cloudflare Tunnel to make your local instance globally available. This is free and you benefit from the native DDoS protection, WAF and CDN from Cloudflare. The cloudflared daemon basically makes an outgoing connection to Cloudflare and makes the designed interfaces available on the internet, without granting access to undesired parts of the network.

Start off by creating a Cloudflare account, going into the "Zero Trust" portion of the account and add a new tunnel.

@zrsmithson
zrsmithson / rhel_install_git_cmake.md
Last active January 30, 2024 14:55
Installing latest cmake and git versions on Rhel/Centos, and setting it as the default commands

Installing the latest git/cmake versions on RHEL/Centos

This should work on other Fedora-based distributions and for other packages, but I have not done extensive testing

Introduction

Using up-to-date versions of software on RHEL is a pain. I understand the eneterprise benefits, but configuring a development environment can be confusing, with most people using a combination of symlinks, adding folders to PATH, and enabling an scl_source

While this is still generally acceptable, there exists an alternative method (sorry).

The alternatives essentially creates a symlink, but it actually is a symbolic link to the alternatives directory, which in turn is a symbolic link to the actual program.

This allows for better package management and confines all sysadmin changes to the /etc directory, all while making switching back easier. It feels to me a lot like virtualenv in python

@longtimeago
longtimeago / squash-commits.md
Last active April 1, 2024 20:44
How to squash commits in a GitHub pull request

How to squash commits in a GitHub pull request

o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?

Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch:

@hotoo
hotoo / convert.sh
Last active April 15, 2023 01:15
convert vimwiki to markdown: `sed -f ex -i *.md`
#!/usr/bin/env bash
for x
do
filename=$(echo $x|sed -e "s/\.wiki$/.md/")
sed -f ex $x > $filename
done