Skip to content

Instantly share code, notes, and snippets.

View othyn's full-sized avatar
🏳️‍🌈
Be kind, and have an adventure.

Ben othyn

🏳️‍🌈
Be kind, and have an adventure.
View GitHub Profile
@othyn
othyn / guide.md
Last active April 24, 2024 00:43
Fix horrendously bad macOS (12.3.1 tested) SMB (Samba) performance on Unraid

Intro

Out of the box, my SMB performance on macOS 12.3.1 would top out at around 20MB/s in short ~5 second bursts, which was absolutely horrendous, slow to navigate in Finder and slugish to interact with.

Since making these changes, I now get sustained ~80-100MB/s+ and instant Finder navigation which is superb and how things should be out-of-the-box (OOTB)!

May 2023 update: As of Ventura, the SMB issues were just horribly inconsistent and hard to maintain. Something in the combination of Unraid, macOS and SMB just doesn't play nice. I ended up binning NFS/SMB all together and heading to a locally hosted Nextcloud instance for file syncing, then using SFTP/Ansible Git flow for editing files within appdata.

Sources

@othyn
othyn / factorio_headless_guide.md
Last active April 15, 2024 08:27
How to setup a Factorio Headless Server

[LINUX] Factorio Headless Server Guide

So, with credit to the Factorio wiki and cbednarski's helpful gist, I managed to eventually setup a Factorio headless server. Although, I thought the process could be nailed down/simplified to be a bit more 'tutorialised' and also to document how I got it all working for my future records.

The specific distro/version I'm using for this guide being Ubuntu Server 16.04.1 LTS. Although, that shouldn't matter, as long as your distro supports systemd (just for this guide, not a Factorio headless requirement, although most distros use it as standard now). The version of Factorio I shall be using is 0.14.20, although should work for any version of Factorio 0.14.12 and higher.

Just a note to newcomers: If there are any issues with the installation steps, people in the comments are doing a good job

@othyn
othyn / unraid_mac_mini.md
Last active February 16, 2024 14:00
Mac mini (late 2012, 6,2) Unraid Setup & Installation / Configuration Log

Mac mini (late 2012, 6,2) Unraid Setup & Installation / Configuration Log

I'm creating this as reference for people looking to run Unraid on a Mac mini, as there really isn't any info about this online. In this case, I'm running an MD388LL/A model (6,2), an Intel based model running an Intel i7-3615QM @ 2.3GHz with 16GB DDR3 1600MHz memory. In terms of drives, I'm currently running the original 120GB Apple re-badged SSD and 1TB Apple re-badged HDD which are both near EoL.

For the USB drive I'm using an old spare USB 2.0 Kingston 32GB DataTraveler 104. Space wise, its completely overkill, but I don't have any other spares to hand given my others have been used up on two other Unraid boxes. As for USB 2.0, I've had more success on 2.0 drives than 3+.

p.s. I know there is no installation step, just trying to get good SEO for this post to help wanderers!

Running into issues...

@othyn
othyn / App.swift
Last active January 30, 2024 10:58
How to disable default menu bar items in Swift / SwiftUI for macOS
//
// App.swift
//
// Created by Ben Tindall on 30/03/2022.
//
import Foundation
import SwiftUI
import Cocoa
@othyn
othyn / write_bootable_windows_iso_to_usb.sh
Last active November 2, 2023 15:25
Quick script to write a bootable UEFI Windows ISO to USB in macOS
#!/bin/bash
# System: Darwin x86_64 19.6.0 (macOS 10.15.6 19G2021)
# Author: Othyn (https://github.com/othyn)
# Source: https://gist.github.com/othyn/29b82e39eb8cdd98adf1be77cbb62700
# Dependencies: pv, wimlib
# Licence: MIT
DEFAULT="\x1b[0m"
RED="\x1b[31m"
@othyn
othyn / phpdocs_facade_generator.php
Created May 24, 2023 09:27 — forked from ardzz/phpdocs_facade_generator.php
PHPDocs facades laravel generator
<?php
/**
* Class FacadePHPDocs
*
* @author Ardhana <ardzz@indoxploit.or.id>
*/
class FacadePHPDocs{
/**
* @var ReflectionClass
@othyn
othyn / Docker connect to remote server.md
Created July 15, 2021 09:11 — forked from kekru/Docker connect to remote server.md
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@othyn
othyn / youtube_clean_watch_later_videos.js
Created October 21, 2022 17:23 — forked from qoomon/youtube_clean_watch_later_videos.js
Clean YouTube Watch Later Videos
// This script will remove all videos from watch later list
//
// Usage
//
// #1 go to https://www.youtube.com/playlist?list=WL
// #2 run following script in your browser console
// adjust REMOVE_BUTTON_TEXT accordingly to your language, see examples below
(async function() {
const REMOVE_BUTTON_TEXT = 'Remove from Watch later'
@othyn
othyn / LogLevel.php
Last active April 2, 2022 02:26
RFC 5424 log levels for BenSampo's Laravel Enum package.
<?php
namespace App\Enums;
use BenSampo\Enum\Enum;
/**
* @method static static Emergency()
* @method static static Alert()
* @method static static Critical()
#!/bin/sh
set -e
# Usage:
# $ https://gist.githubusercontent.com/othyn/87765439d6fa8bdbb193c50935a3b4e1/raw/02a7e9f0e957b286965f88637fac0b6b2b5f7b30/setup_rancher_node.sh | sh
# Designed for:
# - Ubuntu 20.04.4
# - Rancher v2.4.17
# - Docker 20.10