Skip to content

Instantly share code, notes, and snippets.

View douira's full-sized avatar

douira douira

View GitHub Profile
@agyild
agyild / FSR.glsl
Last active July 7, 2024 16:02
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@triphora
triphora / minecraftlinkingexceptiontothegpl.txt
Last active October 1, 2023 04:55
GPL exception for Minecraft
"MINECRAFT" LINKING EXCEPTION TO THE GPL
Linking this mod statically or dynamically with other modules is making a
combined work based on this mod. Thus, the terms and conditions of the GNU
General Public License cover the whole combination.
In addition, as a special exception, the copyright holders of this mod give you
permission to combine this mod with free software programs or libraries that
are released under the GNU LGPL and with code included in the standard release
of Minecraft under All Rights Reserved (or modified versions of such code, with
var pm2 = require('pm2');
var path = require('path');
pm2.start({
name: "PostgresSql",
script: "/postgres/bin/postgres.exe",
args: "-D /postgres/data/pgsql/",
exec_mode: "fork_mode",
max_memory_restart: '2G',
autorestart: true,
output: "out.log",
@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

@Recoskie
Recoskie / Bitwise Log2.js
Last active August 3, 2023 17:42
Super Fast Bitwise Log2, for faster bit lookup algorithams.
//Note method 6 is an single line using only logical and, and or it is the fastest method.
//This document is the steps to creating the singular translation.
//Super Fast log 2 calculation over 32 bit integer in right shift each right shift is an division of 2 in binary.
function Log2_Int32_V1(V)
{
for( var n = 31; n > 0; V >>> n ? ( V = n, n = 0 ) : n-- );
return(V);
}
@rtgibbons
rtgibbons / logger.js
Created November 7, 2013 13:51
Logger Library with winston
var app = require(process.cwd() + '/app');
var winston = require('winston');
var _ = require('lodash');
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'green',
warn: 'yellow',