Skip to content

Instantly share code, notes, and snippets.

egmontkob /
Last active May 10, 2021
Hyperlinks in Terminal Emulators
othyn /
Last active Apr 26, 2021
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

mdwhatcott / custom_json.go
Created Jul 29, 2015
Example of implementing MarshalJSON and UnmarshalJSON to serialize and deserialize custom types to JSON in Go. Playground:
View custom_json.go
package main
import (
func main() {
marnix / Remove-File-Eventually.ps1
Created Nov 20, 2013
PowerShell command to delete a file, if possible immediately, and if it is in use at the next boot.
View Remove-File-Eventually.ps1
[string] $path
# the code below has been used from
# with inspiration from
# and error handling from
janikvonrotz / ConnectRemoteDesktopusingKeePassCredentials
Created Nov 13, 2013
Connect Remote Desktop using KeePass Credentials #KeePass #EmbededPost
View ConnectRemoteDesktopusingKeePassCredentials
cmd://"C:\Windows\System32\cmd.exe" /c cmdkey.exe /generic:TERMSRV/{S:SERVER} /user:{S:DOMAIN}{USERNAME} /pass:{PASSWORD} & mstsc.exe /v:{S:SERVER} & cmdkey.exe /delete:TERMSRV/{S:SERVER}
CMCDragonkai /
Last active May 11, 2021
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
leoapost / gist:4318441
Created Dec 17, 2012
Delete all remote branches, except master
View gist:4318441
# Replace REMOTE_NAME with your remote name (e.g. origin)
git branch -r | grep REMOTE_NAME/ | grep -v 'master$' | grep -v HEAD| cut -d/ -f2 | while read line; do git push REMOTE_NAME :$line; done;
afair / tmux.cheat
Last active May 10, 2021
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
View tmux.cheat
========================================== ==========================================
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &