Skip to content

Instantly share code, notes, and snippets.

View teoxoy's full-sized avatar
🦀

Teodor Tanasoaia teoxoy

🦀
View GitHub Profile
@talon
talon / README.md
Last active June 11, 2021 10:35
Install Docker On Windows 10 Home

Install Docker On Windows 10 Home

"Windows Home Docker Desktop requires Windows 10 Pro or Enterprise version 15063 to run." So says the Docker Installer however, the Docker forums beg to differ

The workaround is to manually image the Hyper-V and Containers features, then trick the installer into thinking you're using Windows Pro.

TL;DR

  1. clone this gist somewhere locally git clone https://gist.github.com/4191def376c9fecae78815454bfe661c.git windows_home_docker
  2. Run windows_home_containers.ps1 in an Administrative Powershell

Deterministic save load in Factorio

One of the key parts of the save/load process in Factorio is that it must be deterministic. This means that for a given save file (when no external factors change) saving, exiting, and loading the save shouldn't change any observable behavior.

There are a few reasons and benefits for this strict requirement:

  • Without it: You couldn't join a running multiplayer game (and by proxy save, exit, and resume one)
  • Without it: the replay system wouldn't work if you ever saved, exited, and resumed playing.
  • With it: we can easily test that saving and loading produces no observable change letting us know we implemented save/load correctly.
  • With it: you won't see things change randomly as a result of "reloading" like you do in so many other games.
@JesseRWeigel
JesseRWeigel / commands.txt
Created April 28, 2017 19:22
ImageMagick Compression Commands
// Must install ImageMagick first
http://www.imagemagick.org/script/index.php
//This compresses a jpg with no visible loss of quality. Add in your own file names for target.jpg and result.jpg
convert -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% target.jpg result.jpg
// This does the same as above but to an entire folder (will overwrite original files):
mogrify -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% *.jpg
//This does the same thing but to all subfolders as well (Be careful with this one it will overwrite all original files)
@bendc
bendc / easing.css
Created September 23, 2016 04:12
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
@clhenrick
clhenrick / README.md
Last active August 16, 2023 09:47
Data URI SVG icons with Leaflet
@walkerjeffd
walkerjeffd / Synology-Diskstation-Git.md
Last active April 27, 2024 15:39
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@cobyism
cobyism / gh-pages-deploy.md
Last active May 7, 2024 18:46
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).