Skip to content

Instantly share code, notes, and snippets.

View NorskNoobing's full-sized avatar

Daniel Holøien NorskNoobing

  • 22:28 (UTC +02:00)
View GitHub Profile
@NorskNoobing
NorskNoobing / labels.blade.php
Created May 2, 2023 10:45
Custom labels snipeit
@php
// Most of the code is taken from this issue https://github.com/snipe/snipe-it/issues/3526#issuecomment-665558690
// No, this code shouldn't be here
// But it's being hacked in-place to minimize the number of file changes until it's properly integrated into the Laravel structure for a PR
require(resource_path('views/hardware/fpdf/fpdf.php'));
// Settings (per label mm chosen)
// All dimensions in mm (except font size)
$labelSettings = array();
sudo apt update
sudo apt upgrade -y
sudo dpkg --configure -a
sudo apt install -y unclutter
#Params
username="sys-tbkiosk"
url="https://selvbetjening.mrfylke.no/agent/app#/reports/report/223"
function Get-MrfkUserInfo {
[CmdletBinding()]
param (
[Parameter(ParameterSetName="username")][string]$Username,
[Parameter(ParameterSetName="displayname")][string]$DisplayName,
[Parameter(ParameterSetName="mobilephone")][string]$MobilePhone
)
process {
switch ($PsCmdlet.ParameterSetName) {

Get a specific date with and offset relative to the input

Installation

  1. Copy the source code that you can find below to a file named getDate.js, and save it in the folder that you'll use for templater userscripts e.g. Obsidian/Templater/Scripts/getDate.js
  2. Go to Settings -> Templater -> User Script Functions -> Script files folder location and set it to your script folder e.g. Obsidian/Templater/Scripts, then press the Refresh button.

Usage

You can use the following syntax to call the function:

<%tp.user.getDate(INPUT_DATE,YEAROFFSET,MONTHOFFSET,DAYOFFSET)%>

This would work with both positive and negative integer values as parameters.