Create a template service file at /etc/systemd/system/[email protected]
. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target
Create a template service file at /etc/systemd/system/[email protected]
. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target
#!/bin/bash | |
function git_is_dirty { | |
[[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]] && echo "yes" | |
} | |
function git_is_diverged { | |
LOCAL=$(git rev-parse --abbrev-ref HEAD 2> /dev/null || echo "none") | |
REMOTE=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2> /dev/null || echo "none") | |
if [[ "$LOCAL" == "none" ]]; then # No commits yet |
GraphQL-LD is a way to query Linked Data using GraphQL.
Instead of querying GraphQL interfaces, Linked Data interfaces are queried, such as SPARQL endpoints, TPF interfaces, Linked Data documents, ... This is done by semantifying GraphQL queries using a JSON-LD context.
Try it out from your browser: http://query.linkeddatafragments.org/
Alternatively, install GraphQL-LD or Comunica SPARQL and execute GraphQL-LD queries on your machine
Do I want to die on this hill?
Am I including everyone?
#!/usr/env python3 | |
######################################################################## | |
# | |
# Simple HTTP server that supports file upload for moving data around | |
# between boxen on HTB. Based on a gist by bones7456, but mangled by me | |
# as I've tried (badly) to port it to Python 3, code golf it, and make | |
# It a little more robust. I was also able to strip out a lot of the | |
# code trivially because Python3 SimpleHTTPServer is a thing, and the | |
# cgi module handles multipart data nicely. | |
# |
#!/bin/bash -i | |
#using shebang with -i to enable interactive mode (auto load .bashrc) | |
set -e #stop immediately if any error happens | |
# Install Open SDK | |
apt update | |
apt install openjdk-8-jdk -y | |
update-java-alternatives --set java-1.8.0-openjdk-amd64 | |
java -version |
GNU nano 4.3 disk-encryption.sh | |
#!/bin/bash | |
set -euxo pipefail | |
rpm -qa clevis* cryptsetup* luks* tpm2* e*fspr* | sort | |
# Creation | |
# dd if=/dev/zero of=/dev/sda1 bs=1M status=progress |
#!/usr/bin/env python3 | |
''' | |
Determine if this python is part of an executable or a standalone script and then delete the file accordingly. | |
If the script has been bundled into an executable using pyinstaller (such as pyinstaller --onefile <fname>.py) then the realpath of __file__ will be incorrect, thus the use of sys.executable. | |
Example of just relying on __file__: | |
$ pyinstaller --onefile test.py | |
[...] | |
$ ls dist/ |
# For recent versions of Ubuntu: | |
- https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/ | |
# Docs: | |
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls | |
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference | |
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html | |
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53 | |
# Download ISO Installer: |