Skip to content

Instantly share code, notes, and snippets.

@warlord0
warlord0 / maintenance
Last active February 25, 2021 11:03
Icinga2 Bash Script for Downtime
#!/bin/bash
# Icinga2 Maintenance mode / Downtime
#
# https://icinga.com/docs/icinga2/latest/doc/12-icinga2-api/#icinga2-api-actions
# Program details
PROGNAME=$(basename $0)
RELEASE="Revision 1.0.0"
AUTHOR="(c) 2020 Paul Bargewell (paul.bargewell@opusvl.com)"
@warlord0
warlord0 / template.sh
Last active October 21, 2021 09:01
Bash Script Template
#!/bin/bash
EXAMPLE="example default"
# Plugin variable description
PROGNAME=$(basename $0)
RELEASE="Revision 1.0.0"
AUTHOR="(c) 2020 Warlord0"
# Functions plugin usage
@warlord0
warlord0 / entry.sh
Created January 28, 2020 08:46
docker-sshd-rssh
#!/usr/bin/env bash
set -e
[ "$DEBUG" == 'true' ] && set -x
DAEMON=sshd
echo "> Starting SSHD"
@warlord0
warlord0 / 00-nuxtjs.conf
Last active September 17, 2021 00:11
Nginx sites-available config for Nuxt.js and Laravel
map_hash_max_size 262144;
map_hash_bucket_size 262144;
map $sent_http_content_type $expires {
"text/html" epoch;
"text/html; charset=utf-8" epoch;
default off;
}
server {
@warlord0
warlord0 / FireSyncObserver.php
Created September 30, 2019 17:03
FireSyncObserver - Synchronise a Laravel Model with Firebase
<?php
/**
* FireSync Observer
*
* Watch for changes and replicate them to the Firebase database
*
* PHP Version 7.1
*
* @category Observer
* @package Firebase
@warlord0
warlord0 / esriFunctions.js
Last active April 8, 2019 08:44
ESRI ArcGIS Vue Mixin
import {
loadScript,
loadModules
} from 'esri-loader'
// preload the ArcGIS API
const options = {
url: '//js.arcgis.com/3.27/',
}
@warlord0
warlord0 / config.xml
Created October 1, 2018 13:56
Crucible config.xml with Reverse Proxy using https
<config control-bind="127.0.0.1:8059" version="1.0">
<!-- see example-config.xml and config.xsd for more documentation -->
<web-server context="/crucible" site-url="https://jira.domain.local/crucible">
<http bind=":8060" proxy-host="jira.domain.local" proxy-port="443" proxy-scheme="https"/>
</web-server>
<security allow-anon="true" allow-cru-anon="true"/>
<repository-defaults>
<linker/>
<allow/>
<tarball enabled="false" maxFileCount="0"/>
@warlord0
warlord0 / .babelrc
Last active September 22, 2018 11:31
React / Webpack template
{
"presets":[
"@babel/preset-env", "@babel/preset-react"
]
}
@warlord0
warlord0 / WSDLController.php
Created August 17, 2018 14:06
Laravel Controller for Lagan Web Services SOAP API (Version 2)
<?php
namespace App\Http\Controllers\Lagan;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
// We need Guzzle for the POST requests
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Client;
@warlord0
warlord0 / WSDLController.php
Created August 17, 2018 09:20
Laravel Controller for Lagan Web Services SOAP API
<?php
namespace App\Http\Controllers\Lagan;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
// We need Guzzle for the POST requests
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Client;