Skip to content

Instantly share code, notes, and snippets.

View derekmahar's full-sized avatar

Derek Mahar derekmahar

  • Montreal, Quebec, Canada
View GitHub Profile
@danmack
danmack / nix-alpine.org
Last active November 11, 2024 15:39
install NIX package manager on Alpine Linux

NIX Package Manager Install on Alpine Linux

System Information

  • alpine 3.17.1, 3.18, 3.19 and edge x86-64
  • multiple linux kernels worked 6.1.8-lts w/zfs and 6.6.8-lts
  • edge, testing apk repos enabled

Preparation

Calibre-web on FreeNAS

Creating the Jail

  • Step 1 - Name Jail and Choose FreeBSD Release

    • Name: calibre-jail
    • Jail Type: Default(Clone Jail)
    • Release: 11.3-RELEASE
│ Row │ expr_type │ count │ percentage │
│ │ Any │ Int64 │ Float64 │
├─────┼────────────────────────────────┼────────┼─────────────┤
│ 1 │ ExprKind{:outer} │ 1 │ 0.000226006 │
│ 2 │ ExprKind{:/=} │ 1 │ 0.000226006 │
│ 3 │ ExprKind{:typed_vcat} │ 1 │ 0.000226006 │
│ 4 │ ExprKind{:.+=} │ 1 │ 0.000226006 │
│ 5 │ ExprKind{:%=} │ 3 │ 0.000678017 │
│ 6 │ ExprKind{:⊻=} │ 7 │ 0.00158204 │
│ 7 │ ExprKind{:.=} │ 8 │ 0.00180804 │
@mixja
mixja / Dockerfile
Last active September 17, 2019 11:06
Docker Health Check using Make
FROM nginx
HEALTHCHECK --interval=3s --retries=20 CMD curl -fs http://localhost:${HTTP_PORT:-8000}
#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted
@xrstf
xrstf / letsencrypt.md
Last active October 30, 2024 07:03
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

@resouer
resouer / pod1.yml
Last active March 13, 2023 08:40
How to implement volumes-from in Kubernetes Pod?
---
apiVersion: v1
kind: Pod
metadata:
name: server
spec:
containers:
- image: resouer/sample:v2
name: war
lifecycle:
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active November 14, 2024 09:13
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04