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 | |
cat /var/lib/dbus/machine-id && exit | |
# Provided by dbus, hence available on all systemd systems. | |
# Any user can read it and it is persistent accross boots. | |
# It is unique per installation, and works well in VMs. | |
# Not all systems (i.e. stage3 gentoo/handbook install) | |
# have dbus installed by default. | |
cat /sys/class/dmi/id/product_uuid && exit |
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/env python3 | |
""" | |
usage: lb.py [listening_port] [backend_host] [backend_port] | |
Only specify one backend host/port. It is expected that | |
other backends can be discovered by DNS at connect time. | |
Useful if, say, your backends are on fully dynamic addresses, | |
but you have a sensible DNS server in front of them. | |
""" | |
import argparse | |
import asyncio |
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/env python | |
""" | |
ListeningSocketHandler | |
====================== | |
A python logging handler. | |
logging.handlers.SocketHandler is a TCP Socket client that sends log | |
records to a tcp server. | |
This class is the opposite. |
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
terraform { | |
backend "remote" { | |
hostname = "app.terraform.io" | |
organization = "secret-org" | |
workspaces { | |
name = "secret-workspace" | |
} | |
} | |
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 | |
# Resets the `staging` branch to the contents of the `production` branch, | |
# all while maintaining history of both trees, harshly. | |
PRODUCTION="${1}" | |
STAGING="${2}" | |
if [ -z "${PRODUCTION}" -o -z "${STAGING}" ]; then | |
echo "Usage: reset.sh <production> <staging>" |
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
import json | |
import requests | |
from boto3.session import Session as AWSSession | |
from gql_py import Gql | |
from requests import Session | |
from requests_aws4auth import AWS4Auth | |
aws = AWSSession() | |
session = Session() |
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
package main | |
import ( | |
"encoding/base64" | |
"fmt" | |
"golang.org/x/crypto/nacl/box" | |
) | |
func main() { | |
plaintext := "hello" |
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/guestfish -f | |
!echo "Modifying gentoo-openstack.qcow2" | |
# Fetch the image from the mirrors. | |
# wget -O gentoo-openstack.qcow2 \ | |
# https://distfiles.gentoo.org/experimental/amd64/openstack/gentoo-openstack-amd64-systemd-latest.qcow2 | |
add gentoo-openstack.qcow2 | |
!echo "Starting libguestfs" |
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
import os | |
import re | |
import requests | |
import tarfile | |
from pathlib import Path | |
from tqdm import tqdm | |
from urllib.parse import urlparse | |
INDEX_URL = "https://nodejs.org/dist/index.json" | |
FETCH_URL = 'https://nodejs.org/dist/{version}/node-{version}-linux-x64.tar.xz' |
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 ubuntu | |
RUN exit 1 | cat | |
RUN echo "Hello World" |
NewerOlder