Skip to content

Instantly share code, notes, and snippets.

@grintor
grintor / deploy_ninja.ps1
Last active February 6, 2024 20:41
A script for migrating to NinjaOne RMM from other RMMs
# deploy_ninja.ps1: A script for migrating to NinjaOne RMM from other RMMs
#
# This script will silently download and install NinjaOne and place the endpoint into the provided organization/location
# If the location does not exist within the organization in NinjaOne, this script will create it.
# If the organization does not exist in NinjaOne, this script will create it.
# If an installer for the provided organization/location has not yet been built in NinjaOne, this script will build it.
#
# USAGE
# -------
# powershell.exe -file auto_ninja.ps1 "organization name" "location name"
@grintor
grintor / post2call.php
Created October 11, 2022 20:09
A freepbx click to call api
<?php
$trunk = 'trunk_name';
/*
This post2call.php creates a json rest api for connecting two phones together with freepbx
append this to extensions_custom.conf (same trunk name as above):
@grintor
grintor / cw_update.ps1
Last active February 28, 2023 16:11
eClinicalworks Automatic Upgrade Script
# A tool to automatically update eClinicalworks EMR to the server version
#
# Copyright (c) 2022 "Chris Wheeler" <cwheeler@tier2.tech>
#
# 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:
diskpart
select disk 0
select part 1
active
exit
bcdboot c:\Windows /s <boot letter>: /f ALL
bootrec /fixmbr
bootrec /fixboot
@grintor
grintor / nozoom.js
Created April 7, 2022 13:20
prevent a webpage from zooming in or out
window.addEventListener('resize', function(evt){document.body.style.zoom = 1 / window.devicePixelRatio});
@grintor
grintor / info.txt
Created February 24, 2022 16:24
Converting a Sangoma FreePBX swap partition to a swap file and resizing the root partition to fill the drive
# look at the free space of "/"
df -h
# install a swap file instead of a swap partition
dd if=/dev/zero of=/swapfile count=2048 bs=1MiB
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab