Skip to content

Instantly share code, notes, and snippets.

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.

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"

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
@jakobii
jakobii / DockerMinecraftServerSetup.md
Last active June 21, 2019 23:31
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

@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 / ConvertTo-DataTable.md
Last active May 2, 2018 23:37
ConvertTo-DataTable

ConvertTo-DataTable.psm1

FUNCTION  ConvertTo-DataTable {
    param(

        [string]
        $TableName,

Smarter Flasy checking in powershell

test-falsy is the function

Function Test-Falsy {
    param(
        # the value you would like to check for null
        [parameter(Mandatory = $true, ValueFromPipeline)]
@jakobii
jakobii / AeriesMonthlyReports.sql
Last active March 27, 2019 19:36
Aeries Monthly Summary Report SQL Query
/*
NAME: AeriesMonthlyAttendanceReport
AUTH: Jacob Ochoa
DATE: 2018-11-15 12:02:14.497
VERSION: 0.2.1
DESCRIPTION:
This is a reverse engineered collection of calculated columns often
used in Aeries Attendance Reports. This Query can be used as a basis
for creating sql reports that are grouped similarly to some of aeries
@jakobii
jakobii / GitCredentials.md
Last active November 18, 2018 07:45
Permanently Persist Git Credentials

use curl credentials

replace with your info.

printf "machine <server>\nlogin <username>\npassword <password>\n" > ~/_netrc

example:

printf "machine github.com\nlogin foo\npassword bar\n" &gt; ~/_netrc
@jakobii
jakobii / anonymous_powershell_functions_callback.ps1
Last active February 8, 2019 20:13
Anonymous Powershell Functions
# Our Custom Logic
$CustomErrorAction = {
param(
$TheError
)
# some custom logic
write-host $TheError -ForegroundColor 'red'
}
# A Contrived Function