Skip to content

Instantly share code, notes, and snippets.

View muety's full-sized avatar
🤓

Ferdinand Mütsch muety

🤓
View GitHub Profile

How to Encrypt Your Home Directory on Ubuntu 22.04

Encryption is a process of transforming data into an unreadable form that can only be accessed by authorized parties. Encryption can protect your personal and sensitive information from unauthorized access, theft, or tampering. One of the ways to encrypt your data on Ubuntu is to encrypt your home directory, which is where your personal files and settings are stored.

This gist will describe how to encrypt your home directory on Ubuntu 22.04 after installation. This method is useful if you have already installed Ubuntu without encryption and want to add it later. It will also work on other versions of Ubuntu that use the ecryptfs-utils package for encryption.

Backup Your Data

Please make sure you have created a backup of your system/files before proceeding with the encryption process. This process may involve significant changes to your system, and having a backup ensures that you can restore your data in case of any unexpected issues during the encr

@tldev-de
tldev-de / database_docker_backup.sh
Last active May 14, 2024 08:51
Simple backup script, that dumps any mysql, mariadb or postgres docker container into zstd compressed files.
#!/bin/bash
# be sure, you have `zstd` installed
#####################################
############## config ###############
#####################################
MYSQL_REGEX='(mariadb|mysql)'
@ajumalp
ajumalp / Install Mosquitto MQTT on Synology NAS Server.txt
Last active June 26, 2024 02:51
Install Mosquitto MQTT on Synology NAS Server
From https://synocommunity.com add http://packages.synocommunity.com to your NAS package sources.
For that, go to NAS->Package Cnter->Click Settings->Package Sources tab.
Then from the community, you can see Mosquitto. Install it.
After installing, please stop the Mosquitto service before updating configuration. You can start service after changes.
Enable Admin login for Synology
Enable SSH in NAS
Download putty and connect to NAS Server
Login using admin
Change to root user [sudo -i, {use admin password}]
Find mosquitto.conf file [find / -name mosquitto.conf]
@pldubouilh
pldubouilh / caddy.conf
Created December 23, 2018 15:05
fail2ban filter for http 401
# lives in filter.d/
[Definition]
failregex = ^<HOST> -.* HTTP/[0-9].[0-9]" 401
ignoreregex =
@npearce
npearce / install-docker.md
Last active July 27, 2024 07:34
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@harperjiang
harperjiang / Nd4j_lstm.scala
Last active June 21, 2019 08:28
Performance comparison of numpy vs nd4j on LSTM implementation
import org.nd4j.linalg.api.ndarray.INDArray
import org.nd4j.linalg.api.ops.impl.broadcast.BroadcastAddOp
import org.nd4j.linalg.api.rng.distribution.impl.UniformDistribution
import org.nd4j.linalg.factory.Nd4j
import scala.util.Random
object Xavier {
def init(shape: Array[Int]): INDArray = {
var n = shape.dropRight(1).product
@alphamu
alphamu / Android Privacy Policy Template
Created February 9, 2017 03:17
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
@kastnerkyle
kastnerkyle / painless_q.py
Last active August 18, 2023 09:32
Painless Q-Learning Tutorial implementation in Python http://mnemstudio.org/path-finding-q-learning-tutorial.htm
# Author: Kyle Kastner
# License: BSD 3-Clause
# Implementing http://mnemstudio.org/path-finding-q-learning-tutorial.htm
# Q-learning formula from http://sarvagyavaish.github.io/FlappyBirdRL/
# Visualization based on code from Gael Varoquaux gael.varoquaux@normalesup.org
# http://scikit-learn.org/stable/auto_examples/applications/plot_stock_market.html
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection
@gonzaloserrano
gonzaloserrano / log.go
Created August 18, 2015 17:56
logrus wrapper
package log
import (
"fmt"
"github.com/Sirupsen/logrus"
"runtime"
"strings"
)
var logger = logrus.New()
@butlerblog
butlerblog / wp_config.php
Last active February 1, 2024 09:00
Configure WordPress #wp_mail function to send through #SMTP server https://b.utler.co/Y3
<?php
/*
* Set the following constants in wp-config.php.
* These should be added somewhere BEFORE the constant ABSPATH is defined.
*
* Author: Chad Butler
* Author URI: https://butlerblog.com
*
* For more information and instructions, see: https://b.utler.co/Y3