Skip to content

Instantly share code, notes, and snippets.

View Ghost-VR's full-sized avatar
😫

Michael Yang Ghost-VR

😫
  • Santa Clara, CA
View GitHub Profile
@Ghost-VR
Ghost-VR / factorio_headless_guide.md
Last active April 12, 2025 04:28 — forked from othyn/factorio_headless_guide.md
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

@Ghost-VR
Ghost-VR / windows_command_line.cmd
Last active June 11, 2021 18:54
Windows command line commands
// Grant access to (sub)directories
icacls "J:\WindowsImageBackup" /grant "Users:(OI)(CI)F" /T
// Windows diff
FC <file1> <file2>
FC /B <file1> <file2> // Bitwise compare
@Ghost-VR
Ghost-VR / Makefile
Created April 29, 2020 08:23
A very simple and efficient Makefile for C++, good for course projects!
CXX :=g++
CXXFLAGS :=-Wall
SRCS :=$(wildcard *.cpp)
SRCS :=$(filter-out demo.cpp, $(SRCS))
SRCS_H :=$(patsubst %.cpp, %.h, $(SRCS))
OBJS :=$(patsubst %.cpp, %.o, $(SRCS))
all: build
run: build
@Ghost-VR
Ghost-VR / header.code-snippets
Last active June 5, 2024 00:20 — forked from coffeenotfound/h.code-snippets
Visual Studio Code Snippet: C/C++ Header Guard; Auto Include
{
"Add include guard": {
"prefix": "guard",
"description": "Adds an ifndef include guard to a C/C++ header",
"body": [
"#ifndef __${TM_FILENAME/^([^\\.]*)\\..*$/${1:/upcase}/}_${TM_FILENAME/^.*\\.([^\\.]*)$/${1:/upcase}/}__",
"#define __${TM_FILENAME/^([^\\.]*)\\..*$/${1:/upcase}/}_${TM_FILENAME/^.*\\.([^\\.]*)$/${1:/upcase}/}__",
"",
"$0",
"",
@Ghost-VR
Ghost-VR / loopback_exempt.txt
Last active March 8, 2020 21:49
Loopback exempt settings for proxying Windows 10 UMP apps (Use UMP App with Shadowsocks etc..)
> netsh winhttp import proxy source=ie
Go to regedit: HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings
find SID of UMP app
> CheckNetIsolation.exe loopbackexempt -a -p=<SID>
Source:
1. https://community.spiceworks.com/topic/868050-define-ie-proxy-settings-machine-wide
2. https://zhuanlan.zhihu.com/p/29989157
Reset: