Skip to content

Instantly share code, notes, and snippets.

View onlime's full-sized avatar

Philip Iezzi (Pipo) onlime

View GitHub Profile
@onlime
onlime / build-encryption-key.sh
Created August 17, 2021 10:22
Secure External Backup with ZFS Native Encryption
#!/bin/bash
#
# This script usually is called on the first login and asks for a password
# to build the LUKS + ZFS encryption keys which then are stored only in volatile
# memory /mnt/ramfs (ramfs).
# This script is added to your /root/.profile in order you won't forget to
# build the encryption key each time you reboot the server.
#
# We are using ramfs instead of tmpfs as there is no swapping support in
# ramfs which is good in a security perspective.
@onlime
onlime / .gitlab-ci.yml
Last active August 18, 2021 16:02
Simple SSH/rsync based continuous deployment of a Nuxt.js static frontend project with GitLab CI/CD
image: node:current
variables:
# In case you did not set up $SSH_KNOWN_HOSTS variable:
# SSH_OPTS: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
SSH_OPTS: ''
BASE_DIR: public_html/blog
KEEP: 5
default:
@onlime
onlime / zfs-destroy-snapshots.py
Created August 6, 2021 11:27
Helper script to remove old ZFS snapshots
#!/usr/bin/env python3
"""
Helper script to remove old ZFS snapshots
Copyright (c) Onlime GmbH, https://www.onlime.ch
"""
import argparse
from re import compile
from datetime import datetime, timedelta
from subprocess import check_output
import sys
@onlime
onlime / accounts.list
Last active May 4, 2023 12:08
imapsync script to migrate multiple IMAP accounts in a row
# <SRCUSER> <SRCPW> <DSTUSER> <DSTPW>
@onlime
onlime / libxl.rb
Last active August 29, 2015 14:05
Homebrew php56-excel (using libxl)
require 'formula'
class Libxl < Formula
homepage 'http://www.libxl.com/'
url 'ftp://xlware.com/libxl-mac-3.6.0.tar.gz'
sha1 '52da78f73e4a8e727c8c73c99435f4136e3774c2'
def install
lib.install 'lib/libxl.dylib'
include.install Dir["include_c/*.h"]
@onlime
onlime / fixpreferences.sh
Created April 22, 2014 14:28
fix user preferences in Roundcube webmail
#!/usr/bin/env php
<?php
/*
+-----------------------------------------------------------------------+
| bin/fixpreferences.sh |
| |
| Copyright (c) 2014 Onlime Webhosting (http://www.onlime.ch) |
| Licensed under the GNU General Public License version 3. |
| |
| PURPOSE: |