Start from a minimal installation of Ubuntu Server 22.04.
In this case, I've set up a VM with two network interfaces, one NAT for connection to the internet, and one bridged network interface to connect from the host to the guest VM.
| #!/usr/bin/python3 | |
| from selenium import webdriver | |
| from selenium.webdriver.firefox.options import Options | |
| from selenium.webdriver.common.by import By | |
| import json | |
| import notify2 | |
| import requests | |
| # The message template used for notifications. |
| ## Example of URL rewriting and whitelisting for the PrimeKey PKI Appliance. | |
| ## Installation instructions: | |
| ## | |
| ## 1. Enable SSH in WebConf. | |
| ## 2. Log in over SSH and edit /etc/httpd/extra-available/customer-urlblacklist.conf using vi. | |
| ## 3. Restart Apache for the changes to take effect | |
| ## | |
| ## systemctl restart httpd | |
| ## | |
| ## Changes to customer-urlblacklist.conf persists across reboots and upgrades but do not survive |
| param( | |
| [Parameter(Mandatory)] | |
| [string]$AccountName, | |
| [Parameter(Mandatory)] | |
| [string]$PkiDnsName, | |
| [switch]$GeneratePassword, | |
| [switch]$Force |
| # -*- coding: utf-8 -*- | |
| # Note: The intended way of searching for available time slots is to go to https://fp.trafikverket.se/boka. | |
| # I'm only posting this because there are some third-party profiteers out there providing this sort of service. | |
| # Even though the API is publicly available, you may not be allowed to use it, but I'm not a lawyer. I do not | |
| # take responsibility for how you use this script, or the legal consequences of doing so. | |
| from subprocess import check_output | |
| from urllib.request import urlopen | |
| from urllib.parse import quote |
| function mvn-resolve --description 'Resolve Maven dependencies from a POM' | |
| for dependency in (cat pom.xml | xq -c .project.dependencies.dependency[]) | |
| set groupId (echo $dependency | jq -r .groupId) | |
| set artifactId (echo $dependency | jq -r .artifactId) | |
| set artifactVersion (echo $dependency | jq -r .version) | |
| mvn dependency:get -Ddest=./ -Dartifact=$groupId:$artifactId:$artifactVersion > /dev/null | |
| end | |
| end |
| # | |
| # Script for parsing certificate templates for Active Directory | |
| # Certificate Services, exported from Active Directory as LDIF. | |
| # | |
| # On a Windows machine, you can perform the export using ldifde. | |
| # For example, if you want to export a certificate template named | |
| # "MyTemplate" residing in the "example.com" domain, you would run | |
| # the following command: | |
| # | |
| # ldifde -m -v -d "CN=MyTemplate,CN=Certificate Templates, |
| The name of this gist. |
| # AB Kristianstadsbyggen kräver att man som bostadssökande loggar in | |
| # minst en gång per år för att inte tappa sina ködagar. | |
| # | |
| # Följande program automatiserar inloggningen med hjälp av Selenium. | |
| # | |
| # Innan du kan starta programmet på din dator måste du köra följande | |
| # kommandon (Ubuntu): | |
| # | |
| # pip3 install selenium | |
| # sudo apt install firefox |
| function fish_greeting -d "Greeting message on shell session start up" | |
| echo "" | |
| echo -en " ⏳ " (show_date_info) "\n" | |
| echo -en " 📻 " (show_net_info) "\n" | |
| echo -en " 💾 " (show_mem_info) "\n" | |
| if teatime | |
| echo -en " 🍵 Time to get a cup of tea!\n" | |
| end | |
| if insomnia | |
| echo -en " 😴 Using the computer at night can cause insomnia!\n" |