Skip to content

Instantly share code, notes, and snippets.

@othyn
othyn / factorio_headless_guide.md
Last active January 15, 2025 02:32
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

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active January 15, 2025 02:31
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active January 15, 2025 02:30
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
@stefanbringuier
stefanbringuier / generate_interfaces.py
Created November 15, 2024 22:51
Python function for generating coherent (hkl) interfaces between substrate and film materials using `pymatgen` and `ASE`. The script identifies symmetrically distinct Miller indices, builds interfaces with specified thickness and vacuum parameters, and outputs the results as ASE Atoms objects for further analysis or visualization.
from pymatgen.core.structure import Structure
from pymatgen.analysis.interfaces import CoherentInterfaceBuilder
from pymatgen.core.surface import get_symmetrically_distinct_miller_indices
from pymatgen.io.ase import AseAtomsAdaptor
from ase.atoms import Atoms
from typing import List
from joblib import Parallel, delayed
import warnings
def generate_interfaces(
@matthewjberger
matthewjberger / instructions.md
Last active January 15, 2025 02:27
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@zhuziyi1989
zhuziyi1989 / URL Schemes.md
Last active January 15, 2025 02:27
常用 URL Schemes 收集。

** 由于此文年事已久,可能某些 URL Schemes 已失效,可在评论区留言指出!(最后更新于 2024.10.28)

关于 URL Scheme 你知道多少?

iOS 系统中

由于苹果的各应用都是在沙盒中,不能够互相之间访问或共享数据。但是苹果还是给出了一个可以在 APP 之间跳转的方法:URL Scheme。简单的说,URL Scheme 就是一个可以让 APP 相互之间可以跳转的协议。每个 APP 的 URL Scheme 都是不一样的,如果存在一样的 URL Scheme,那么系统就会响应先安装那个 APP 的 URL Scheme,因为后安装的 APP 的 URL Scheme 被覆盖掉了,是不能被调用的。

Android 系统中

@alexfornuto
alexfornuto / matrix.sh
Last active January 15, 2025 02:25
Matrix Bash Script
#!/bin/bash
#
# matrix: matrix-ish display for Bash terminal
# Author: Brett Terpstra 2012 <http://brettterpstra.com>
# Contributors: Lauri Ranta and Carl <http://blog.carlsensei.com/>
#
# A morning project. Could have been better, but I'm learning when to stop.
### Customization:
blue="\033[0;34m"
const fs = require("fs");
const { SourceMapConsumer, SourceMapGenerator } = require("source-map");
function reverseSourceMap(sourceMap) {
return SourceMapConsumer.with(sourceMap, null, (consumer) => {
const reversedMap = new SourceMapGenerator();
consumer.eachMapping((mapping) => {
reversedMap.addMapping({
generated: {
line: mapping.originalLine,
@reinvanoyen
reinvanoyen / terminal-prompt-git-branch-zsh.md
Last active January 15, 2025 02:13
Add Git Branch Name to Terminal Prompt (MacOS zsh)

Add Git Branch Name to Terminal Prompt (zsh)

Updated for MacOS with zsh

  • Catalina
  • Big Sur
  • Monterey
  • Ventura
  • Sonoma

screenshot