Skip to content

Instantly share code, notes, and snippets.

View mattcarlotta's full-sized avatar

Matt Carlotta mattcarlotta

  • Oregon, USA
  • 07:23 (UTC -07:00)
View GitHub Profile
@mattcarlotta
mattcarlotta / Git_Details_for_Gnome-Terminal.txt
Last active February 12, 2023 22:22
Git Details for Gnome-Terminal
# Script to display the git details of a git tracked folder
#
# MIT License
#
# Copyright (c) 2021-2022 Matt Carlotta
#
# Introduction:
# - This script aims to display git details within a gnome terminal
# by traversing each directory from the current working directory
# and checking if a '.git' folder is present
function timeZone(date = new Date()) {
const offset = date.getTimezoneOffset();
const absOffset = Math.abs(offset);
const hours = Math.floor(absOffset / 60);
const minutes = absOffset % 60;
const minutesOut = minutes > 0 ? ':' + ('0' + minutes).slice(-2) : '';
return (offset < 0 ? '+' : '-') + hours + minutesOut;
}
export default function dateTime(options = {}) {
@mattcarlotta
mattcarlotta / Lets_Encrypt_Synology_Gitlab.MD
Last active August 8, 2023 07:43
Lets Encrypt - Synology NAS + sameersbn/docker-gitlab (HTTPS)

Let's Encrypt - Synology NAS + sameersbn/docker-gitlab

Getting HTTPS on a Synology NAS + Gitlab container is a bit tricky. Using self-assigned OpenSSL certificates is great, but it can only provide SSL certificates that inevitably will be flagged as untrusted by the browser due to the common name being unrecognized/not associated with a trusted SSL provider:

The downside will be that every user that remotely accesses your NAS will be greeted with the above message unless they manually add the certificate to their browser's approved SSL provider list. Instead, here's a work-around to enable HTTPS for both your Synology NAS and a Gitlab container using just one Let's Encrypt certification.

For more information regarding the docker-gitlab installation and set up: Synology Docker