Skip to content

Instantly share code, notes, and snippets.

@jakobii
jakobii / HTTPServer.ps1
Last active May 4, 2024 14:02
A Basic Powershell Webserver
# You Should be able to Copy and Paste this into a powershell terminal and it should just work.
# To end the loop you have to kill the powershell terminal. ctrl-c wont work :/
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
@jakobii
jakobii / DockerMinecraftServerSetup.md
Last active August 12, 2025 08:00
Minecraft Server with Docker

Running a Minecraft Server with Docker on Ubuntu

Managing your Mincraft server with docker is a little bit nicer than just using the old "screen -r Mincraft" trick. docker can do snaphoting and auto restarting, and will allow you to think of the Mincraft server as a service, not just a java file that is being executed. Heres how I built mine. You should not have to edit the docker files. Just make sure you replace minecraft jar file version inside the code blocks when specified.

obviosly the only difference if your not using Ubuntu is the installation of java and the installation of docker

how to build it

Install all the things

On MS SQL Server

to Accurately calcutalte the age of something this works for most situations

SELECT
  FLOOR( --floor function returns age in years
    CAST( DATEDIFF( DAY, /*StartDate*/ , /*EndDate*/ ) AS DEC(38,16) ) / CAST(365.2425 AS DEC(38,16)) 
  ) As AgeInYears

FROM SomeTable
diskpart
select disk 3
clean
create partition primary size=300
format quick fs=ntfs label="System"
assign letter="s"
active
create partition primary
format quick fs=ntfs label="Windows"
assign letter="w"

Install osTicket

enter image description here

This documentation shows you how to install and configure osTicket v1.10 (901e5ea) on Ubuntu 16.04
updated 4/11/2017

Install all the things

once you have done the initial install of Ubuntu 16.04, Connect to the machine over ssh. then run the following commands. this will install all required dependencies. you will be prompted to set the root password for the Mysql database.