Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View moismailzai's full-sized avatar

Mo Ismailzai moismailzai

View GitHub Profile
@Jip-Hop
Jip-Hop / boot.sh
Last active June 21, 2023 17:38
Using Docker on TrueNAS SCALE (no Kubernetes)
#!/usr/bin/env bash
#
# Enable docker and docker-compose on TrueNAS SCALE (no Kubernetes)
#
# This script is a hack! Use it at your own risk!!
# Using this script to enable Docker is NOT SUPPORTED by ix-systems!
# You CANNOT use SCALE Apps while using this script!
#
# 1 Create a dedicated Docker zvol on one of your zpools: zfs create -V 100G data/_docker
diff --git a/Dockerfile b/Dockerfile
index 5e32433..f746306 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -24,8 +24,17 @@ PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
RUN \
echo "**** install runtime packages ****" && \
apt-get update && \
+ apt-get install -y software-properties-common && \
+ add-apt-repository ppa:oibaf/graphics-drivers -y && \
@djfdyuruiry
djfdyuruiry / README.md
Last active March 7, 2024 16:35
WSL 2 - Enabling systemd

Enable systemd in WSL 2

NOTE: If you have Windows 11 there is now an official way to do this in WSL 2, use it if possible - see MS post here (WINDOWS 11 ONLY)

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

@ibaiul
ibaiul / Protonmail.md
Last active March 1, 2024 10:24
Configure the protonmail bridge linux client on CentOS server and Fedora

Protonmail on CentOS server

#protonmail #centos #fedora #linux

Before you start

Currently protonmail bridge for linux is distributed as part of an open beta program, but soon it will be made public (https://protonmail.com/bridge/install).

Consider that the bridge linux client requires a paid protonmail account to work.

Get the protonmail bridge linux installer

@jonfriesen
jonfriesen / .travis.yml
Last active March 20, 2021 08:23 — forked from ryboe/.travis.yml
Example .travis.yml for Golang with CodeCov.io integration
language: go
# Only the last two Go releases are supported by the Go team with security
# updates. Any versions older than that should be considered deprecated.
# Don't bother testing with them. tip builds your code with the latest
# development version of Go. This can warn you that your code will break
# in the next version of Go. Don't worry! Later we declare that test runs
# are allowed to fail on Go tip.
go:
- 1.9
@w00fz
w00fz / sphp.sh
Last active February 7, 2022 00:12
PHP switcher
#!/bin/bash
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
fi
# Usage
@gabrielelana
gabrielelana / Vagrantfile
Last active January 2, 2024 18:58
How to create a VirtualBox machine with encrypted storage with Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
PASSWORD_PATH = ".password"
PASSWORD_ID_PATH = ".password_id"
# Make sure to have installed vagrant-triggers plugin
# > vagrant plugin install vagrant-triggers
# After the first `vagrant up` stop the VM and execute the following steps
@andrezrv
andrezrv / varnish-purge-cache.sh
Created November 2, 2013 06:07
Purge all Varnish cache.
# Purge all Varnish cache
varnishadm "ban req.url ~ /"
@hakre
hakre / DateInterval_11556731.php
Created July 19, 2012 09:12
How we can add two date intervals in PHP
<?php
/**
* How we can add two date intervals in PHP
* @link http://stackoverflow.com/q/11556731/367456
* @link http://codepad.viper-7.com/oBW2le
*
* NOTE: This code is rough.
*/
header("Content-Type: text/plain;");
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 18, 2024 10:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname