This example takes olddisk.qcow2
and resizes it into newdisk.qcow2
,
extending one of the guest's partitions to fill the extra space.
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/sh | |
. /etc/os-release | |
PRETTY_NAME=`awk -F= '$1=="PRETTY_NAME" { print $2 ;}' /etc/os-release | tr -d '"'` | |
VERSION_ID=`awk -F= '$1=="VERSION_ID" { print $2 ;}' /etc/os-release` | |
UPTIME_DAYS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 / 86400) | |
UPTIME_HOURS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 / 3600) | |
UPTIME_MINUTES=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 % 3600 / 60) | |
cat > /etc/motd << EOF |
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
# syntax=docker/dockerfile:1.7 | |
FROM ubuntu:20.04 | |
ARG PYTHON_VERSION="3.11" | |
ENV TZ=US/Chicago | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN <<EOF | |
#!/usr/bin/env bash |
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
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib | |
# in an Alpine based Docker image. | |
ARG VERSION=3.18 | |
FROM alpine:${VERSION} | |
RUN apk update \ | |
&& apk add \ | |
--no-cache \ |
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
# Source: https://gist.github.com/vfarcic/77c63cede031951654d5fea5ce0acb43 | |
######################################################################################### | |
# Say Goodbye to Makefile - Use Taskfile to Manage Tasks in CI/CD Pipelines and Locally # | |
######################################################################################### | |
# Additional Info: | |
# - Task: https://taskfile.dev | |
# - Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: https://youtu.be/oosQ3z_9UEM |
This documentation adds important additions to the docs for kamal deploy tool (see github.com/basecamp/kamal)
You can use kamal deploy --destination staging
This will read config/deploy.yml and config/deploy.staging.yml files, and also will read .env.staging file if it exists.
To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT
- Get PAT (personal access token)
Personal Settings > Developer settings > Personal access tokens
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
# code: language=ansible | |
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: true | |
any_errors_fatal: true | |
vars: | |
base_dir: "{{ home_dir }}/git/nerd-fonts" | |
repo_url: https://github.com/ryanoasis/nerd-fonts.git |
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 bash | |
# run this on the remote terminal machine, as auser with sudo powers, probably through a remote ssh shell | |
# this will overwrite all the settings it touches | |
# the name of the user to run these commands as | |
TARGET_USER=jane | |
# we need an inlocked desktop session. we can either start a new autologin one or unlock an existing one |
NewerOlder