Skip to content

Instantly share code, notes, and snippets.

@rafaelbiriba
rafaelbiriba / tree-report.sh
Last active March 7, 2024 03:19
Generate tree report file on NAS and send it by email (optional)
#!/bin/bash
# Creates DISK0.tree, DISK1.tree, DISKx.tree inside each disk, with the output of tree command.
# After generating the report, it send via email using mail.
# To add more disks, just add DISK[x]=/full/path to the disk. Just make sure that the array index are sequencial.
# Why this?
# With the reports from tree, in case of disk failure, you will know which file got lost and you can recover them, downloading or via backups.
# GIST: https://gist.github.com/rafaelbiriba/0ee7ca2baec1ef80a878c825295f09e1
EMAIL_ADDRESS="" # EMAIL_ADDRESS="email@gmail.com" or leave it blank "" to disable email
DISKS[0]="/srv/dev-disk-by-id-ata-WDC_WD80EMAZ-00WJTA0_ABC123-part1"
@mokoshalb
mokoshalb / Office_kms
Created July 4, 2019 05:36 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
cd\Program Files\Microsoft Office\Office16
cd\Program Files (x86)\Microsoft Office\Office16
cscript OSPP.VBS /sethst:kms.digiboy.ir
cscript OSPP.VBS /actcscript OSPP.VBS /dstatus
slmgr.vbs /ckms
@lint
lint / Hello.bat
Last active September 18, 2019 14:36
Gist for u/symch - Hello.bat & startmax.bat
@ECHO OFF
ECHO s@@G%7777%e@@^
ECHO B77777777777777777777@
ECHO C77777777777777777777777777@73@
ECHO @777777777777777777777777777777@t77G
ECHO 77777777777777777777777@777777777@t7@777
ECHO 77777777777777777777777777777777777Qttt77t
ECHO @7777777777777777777777777777777777737tttt@7@
ECHO 777777777777777777777777777777%7s77%7t777t73t7
ECHO @777777777777777777777777777777777777t777t777t77
@othyn
othyn / factorio_headless_guide.md
Last active May 20, 2024 19:23
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

@agumonkey
agumonkey / archlinux-iso-loopback-grub.txt
Created April 22, 2016 20:19
a grub template to boot an archlinux iso straight from the image using grub2 loopback
menuentry "Archlinux-2015.09.01-dual.iso [x86_64]" --class iso {
set isofile="/archlinux-2015.09.01-dual.iso"
set partition="2"
echo -n 'loop > '
loopback loop (hd0,$partition)/$isofile
echo -n 'kern > '
linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201509 img_dev=/dev/disk/by-uuid/1b8e7605-4a1b-4e8d-a67e-44c5734f0313 img_loop=$isofile earlymodules=loop
# linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201509 img_dev=/dev/disk/by-label/boot img_loop=$isofile earlymodules=loop
echo -n 'init > '
initrd (loop)/arch/boot/x86_64/archiso.img
@Pysis868
Pysis868 / grub.cfg
Last active May 29, 2024 20:27
My own configuration file for GRUB2 to boot various live distributions of Linux-based operating systems, along with some system tools. I tried to include a lot of sample configuration entries, even if I don't currently use them, so it may help others. Exceedingly long blog post: http://tehfishyblog.logdown.com/chips/306146-a-homemade-ultimate-bo…
# Config for GNU GRand Unified Bootloader (GRUB) (2)
# /boot/grub2/grub.cfg
# or
# /boot/grub/grub.cfg
# Mostly only 'legacy' CSM/BIOS boot methods currently.
# Unable to boot loop entries with Secure Boot
# Notes:
# Description:
# This grub.cfg file was created by Lance http://www.pendrivelinux.com