(Tested on TrueNAS-SCALE 24.10-RC1)
DEBIANVER=$(lsb_release -cs 2>/dev/null)
DEBARCH_ALTMETHOD=$(/usr/bin/dpkg-query --print-avail | grep Architecture| grep -v all|uniq|cut -d' ' -f2)
CUSTOMPARENT=ntfs
| import sys | |
| import pprint | |
| import struct | |
| import socket | |
| import ssl | |
| from time import sleep | |
| # Standard "HELLO" message for TDS | |
| prelogin_msg = bytearray([ 0x12, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x06, 0x01, 0x00, 0x20, | |
| 0x00, 0x01, 0x02, 0x00, 0x21, 0x00, 0x01, 0x03, 0x00, 0x22, 0x00, 0x04, 0x04, 0x00, 0x26, 0x00, |
| # Copyright (c) 2018 Bao Nguyen <b@nqbao.com> | |
| # | |
| # 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: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all |
| if (-not ("win32.nativemethods" -as [type])) { | |
| add-type -Namespace Win32 -Name NativeMethods -MemberDefinition @" | |
| [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] | |
| public static extern IntPtr SendMessageTimeout( | |
| IntPtr hWnd, uint Msg, UIntPtr wParam, string lParam, | |
| uint fuFlags, uint uTimeout, out UIntPtr lpdwResult); | |
| "@ | |
| } | |
| $HWND_BROADCAST = [intptr]0xffff; |
| Sources: | |
| https://www.linkedin.com/pulse/activemq-configure-postgresql-message-persistence-syed-shabbir/ | |
| https://access.redhat.com/documentation/en-us/red_hat_jboss_a-mq/6.2/html-single/configuring_broker_persistence/index#FuseMBPersistJDBCStore | |
| https://issues.apache.org/jira/browse/AMQ-6780?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel | |
| ------------------------------------------------------------------------- | |
| When the versioning format changed for JDBC driver between 9.4.1212 and 42.0.0 so did the name from "postgres_native_driver" to "postgres_jdbc_driver" | |
| The PostgresqlJDBCAdapter uses the name to find the class but has no reference for postgres_jdbc_driver |
| #!/usr/bin/python | |
| import sys | |
| import argparse, json, base64, struct | |
| import urllib2 | |
| from datetime import datetime | |
| ## https://crt.sh/monitored-logs | |
| LOGS = { | |
| 'rocketeer': 'https://ct.googleapis.com/rocketeer', |
| #!/bin/bash | |
| export LOGTAG="frontend-connect" | |
| function log { logger -t $LOGTAG -- $1; } | |
| function die { | |
| [[ -n "$1" ]] && log "$1" | |
| echo "$1" | |
| exit 1 | |
| } |
| #!/bin/bash | |
| #https://gist.github.com/davidedg/c29c478ee9c15a804a99cbd1de364647#file-userdata | |
| # Intended to run together with AMI amzn-ami-vpc-nat-hvm-*, with ASG min=max=desired=1 | |
| # Tested with amzn-ami-vpc-nat-hvm-2018.03.0.20180811-x86_64-ebs (ami-0ea87e2bfa81ca08a) | |
| # Expected TAGS: | |
| # - Backend Subnets: Name=InternetNAT Values=AvailabilityZone ( eg: eu-west-1 ) where Frontend NAT Instance is (this allows for multiple NAT instances to serve differenze AZ subnets | |
| # - Backend Subnets + ASG: Name=Environment, Values=EnvironmentLabel ( eg: "production", "staging" ... ) (this allows for multiple environments in same VPC, served by different NAT instances) | |
| # - ASG: Name=EIP Values=EIP-allocation-id ( eg eipalloc-abcdef12 ) | |
| PATH="/usr/sbin:/sbin:/usr/bin:/bin" | |
| function log { logger -t "NAT-instance" -- $1; } |