Enabling multicast DNS (mDNS) on a server allows other hosts on the local network to address the server as <hostname>.local.
mDNS is disabled by default in Ubuntu Server:
$ resolvectl mdns
Global: no
Link 2 (eno1): noEnabling multicast DNS (mDNS) on a server allows other hosts on the local network to address the server as <hostname>.local.
mDNS is disabled by default in Ubuntu Server:
$ resolvectl mdns
Global: no
Link 2 (eno1): no| # Generate a random Alphanumeric string | |
| Function Get-RandomAlphanumericString { | |
| [CmdletBinding()] | |
| Param ( | |
| [int] $length = 8 | |
| ) | |
| Begin{ |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Gist List</title> | |
| <script> | |
| function addElement(str, link) { |
| docker run \ | |
| --name {{printf "%q" .Name}} \ | |
| {{- with .HostConfig}} | |
| {{- if .Privileged}} | |
| --privileged \ | |
| {{- end}} | |
| {{- if .AutoRemove}} | |
| --rm \ | |
| {{- end}} | |
| {{- if .Runtime}} |
| # Compress and decompress byte array | |
| function Get-CompressedByteArray { | |
| [CmdletBinding()] | |
| Param ( | |
| [Parameter(Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName)] | |
| [byte[]] $byteArray = $(Throw("-byteArray is required")) | |
| ) | |
| Process { |
| let numbers = Application('Numbers') | |
| numbers.includeStandardAdditions = true | |
| numbers.activate() | |
| delay(1) | |
| SystemEvents = Application('System Events') | |
| Notes = SystemEvents.processes['Numbers'] | |
| let jsonStr = "[{\"datum\":\"26 januari 2018 16:28\",\"biljett\":\"Enkelbiljett\",\"pris\":\"39,00\",\"moms\":\"2,21\",\"total\":\"39,00\"},{\"datum\":\"24 januari 2018 17:09\",\"biljett\":\"Enkelbiljett\",\"pris\":\"39,00\",\"moms\":\"2,21\",\"total\":\"39,00\"},{\"datum\":\"20 januari 2018 16:14\",\"biljett\":\"Enkelbiljett\",\"pris\":\"47,00\",\"moms\":\"2,66\",\"total\":\"47,00\"},{\"datum\":\"14 januari 2018 02:17\",\"biljett\":\"Enkelbiljett\",\"pris\":\"27,00\",\"moms\":\"1,53\",\"total\":\"27,00\"},{\"datum\":\"13 januari 2018 18:06\",\"biljett\":\"Enkelbiljett\",\"pris\":\"27,00\",\"moms\":\"1,53\",\"total\":\"27,00\"},{\"datum\":\"22 december 2017 14:22\",\"biljett\":\"Enkelbiljett\",\"pris\":\"46,00\",\"moms\":\"2,60\",\"total\":\"46,00\"},{\"datum\":\"21 december 2017 17:20\",\"biljett\":\"Enkelbiljett\",\"pr |
| #!/usr/bin/env groovy | |
| import javax.crypto.SecretKeyFactory | |
| import javax.crypto.SecretKey | |
| import javax.crypto.Cipher | |
| import javax.crypto.spec.PBEParameterSpec | |
| import javax.crypto.spec.PBEKeySpec | |
| import java.util.Base64 | |
| import java.util.Base64.Decoder | |
| import static java.nio.charset.StandardCharsets.UTF_8 |
| import java.math.BigInteger; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| import java.util.List; | |
| import java.util.Random; | |
| import java.util.concurrent.ExecutionException; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.Future; | |
| import java.util.concurrent.TimeUnit; |
| <?xml version="1.0" standalone='no'?> | |
| <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> | |
| <service-group> | |
| <name replace-wildcards="yes">%h</name> | |
| <service> | |
| <type>_adisk._tcp</type> | |
| <txt-record>sys=waMa=0,adVF=0x100</txt-record> | |
| <txt-record>dk0=adVN=Time Capsule,adVF=0x82</txt-record> | |
| </service> | |
| <service> |
| #!/usr/bin/env groovy | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.nio.charset.StandardCharsets; | |
| import java.lang.StringBuilder; | |
| import java.util.concurrent.TimeUnit; |