Skip to content

Instantly share code, notes, and snippets.

View NeilHanlon's full-sized avatar

Neil Hanlon NeilHanlon

View GitHub Profile
async function qualification(component: Input): Promise<Output> {
const url = component.domain?.url;
const token = component.domain?.token;
if (!(url && token)) {
return {
result: 'failure',
message: 'url and token are required'
}
import requests
import typing as t
repos = {
"alpine": None,
"debian": None,
"ubuntu": None,
"centos": None,
"fedora": None,
"archlinux": ["archlinux"],
import requests
import typing as t
repos = {
"alpine": None,
"debian": None,
"ubuntu": None,
"centos": None,
"fedora": None,
"archlinux": ["archlinux"],
import com.santaba.agent.groovyapi.snmp.Snmp;
import javax.xml.bind.DatatypeConverter;
def convertHexIPtoString(hex) {
if (hex.contains(":")) {
tempaddr = hex.split(":")
hex = tempaddr.join("")
}
InetAddress address = InetAddress.getByAddress(DatatypeConverter.parseHexBinary(hex))
term from-ospf {
from {
protocol ospf;
route-filter 10.0.0.0/8 orlonger;
}
then accept;
}
term from-ospf_accept-only-large-externals {
from {
protocol ospf;
var DAYSOFWEEK = [ScriptApp.WeekDay.SUNDAY, ScriptApp.WeekDay.MONDAY, ScriptApp.WeekDay.TUESDAY,
ScriptApp.WeekDay.WEDNESDAY, ScriptApp.WeekDay.THURSDAY,
ScriptApp.WeekDay.FRIDAY, ScriptApp.WeekDay.SATURDAY];
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}
function isValidDate(d) {
return d instanceof Date && !isNaN(d);
#!/bin/sh
PATH=/usr/local/bin:/usr/bin:/bin
sudo cp /volume1/docker/www.usenet.conf /etc/nginx/app.d/www.usenet.conf
sudo nginx -s reload
server {
listen [::]:80;
server_name www.drop1.neilhanlon.me drop1.neilhanlon.me;
root /var/www/html/;
index index.html;
location / {
root /var/www/html/;
access_log on;
try_files $uri $uri/;
[platform]
name = XCP
version = 2.3.0
[branding]
name = XenServer
version = 7.2.0
[keys]
key1 = RPM-GPG-KEY-XS-7-LCM
default_vlans: &default_vlans "{
'vlan {{ admin_vlan }}': {
'description': 'Production/Administration',
'tagged_members': [
{
'port': 'port-channel 10',
'state': 'present'
}
],
'state': 'present'