- Replace the existing sources.list with the on in this Gist.
apt update && apt full-upgrade -y
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from msal import PublicClientApplication | |
import requests | |
def get_authorisation_token(): | |
app = PublicClientApplication( | |
"***Your Application (client) ID****", | |
authority="https://login.microsoftonline.com/consumers") | |
scopes = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | |
Start-Service sshd | |
Set-Service -Name sshd -StartupType 'Automatic' | |
ssh-keyscan localhost | ssh-keygen -lf - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace example.com with your domain | |
hostnamectl set-hostname <hostname>.example.com # FQDN required for DNS registrations by realm (not sure why) | |
mkdir -p /var/log/journal # Persist logs across reboots | |
apt update && apt full-upgrade -y && apt auto-remove -y # Get software up to date | |
apt install -y unattended-upgrades packagekit realmd dnsutils sudo # Install required packages | |
pam-auth-update --enable mkhomedir # Allow automatic creation of home directories for domain users | |
echo '%domain\ [email protected] ALL=(ALL:ALL) ALL' > /etc/sudoers.d/example.com # Allow all domain users to act as root in high-trust environments | |
ssh-keyscan localhost | ssh-keygen -lf - # Take a record of the SSH keys for secure login | |
realm join -v -U <your unqualified domain user name> example.com # J |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
BACKUPDIR="../minecraft-backups" | |
set_most_recent_backup_file() { | |
MOSTRECENTLOCALBACKUPFILE=$(find "$BACKUPDIR" -type f -printf '%f\n' | sort -r | head -1) | |
echo "Most recent local backup file: $MOSTRECENTLOCALBACKUPFILE" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(tidyverse) | |
library(lubridate) | |
library(plotly) | |
library(scales) | |
ui <- shiny::fillPage( | |
titlePanel("Coronavirus in NZ"), | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> | |
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild> | |
</PropertyGroup> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> | |
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild> | |
</PropertyGroup> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Optional steps: | |
#apt update && apt full-upgrade -y && apt auto-remove -y | |
#apt install -y vim-nox | |
apt install -y packagekit realmd | |
pam-auth-update --enable mkhomedir | |
echo '%domain\ [email protected] ALL=(ALL:ALL) ALL' > /etc/sudoers.d/example | |
realm join -v -U domain_admin_user_name example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
curl -Ss https://feeds.pacific-content.com/commandlineheroes | hxnormalize -ex | hxselect "enclosure[url\$='.mp3']::attr(url)" -c -s '\n' | xargs -n 1 curl -LO |
NewerOlder