Skip to content

Instantly share code, notes, and snippets.

{
"components": {},
"info": {
"description": "Swagger auto-generated from learnt schema for demo-shop",
"title": "demo-shop",
"version": "2023-10-13 19:40:23"
},
"openapi": "3.0.3",
"paths": {
"/": {
#!/bin/bash
sudo useradd -m runner > /dev/null 2>&1
echo "runner ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/runner > /dev/null 2>&1
cat << 'EOF' | sudo tee /tmp/deploy.sh > /dev/null 2>&1
#!/bin/bash
NAME=$(uuidgen)
if ! command -v jq > /dev/null 2>&1; then
#!/bin/bash
curl -LJO "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64"
tar -xvf vscode_cli_alpine_x64_cli.tar.gz
chmod +x code
sudo cp code /usr/local/bin
cat << EOF | sudo tee /etc/systemd/system/code.service
[Unit]
Description=Visual Studio Code CLI service
[Service]
{
"$id" : "schema.policy.json",
"$schema" : "http://json-schema.org/draft-07/schema#",
"definitions" : {
"link" : {
"properties" : {
"link" : {
"format" : "uri",
"type" : "string"
}
@m-bers
m-bers / README.md
Last active January 19, 2023 16:36
lima/vscode automation

Lima / Visual Studio Code integration

Prerequisites

  • lima
  • vscode
  • jq
  • curl

Installation

@m-bers
m-bers / ramroot.sh
Last active April 22, 2023 22:11
Convert running Ubuntu system to Arch Linux
#!/bin/bash
# Install prereqs - Ubuntu
apt-get update && apt-get -y install \
qemu-utils
# Stop services
df -TH > mounted_fs
systemctl list-units \
--type=service \
# Generated by Powerlevel10k configuration wizard on 2022-09-06 at 00:46 UTC.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 28996.
# Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 1 line,
# compact, many icons, concise, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
# your own config based on it.
#
# Tip: Looking for a nice color? Here's a one-liner to print colormap.

UDF environment deployment script

This script will configure a fresh UDF instance in several ways:

  • Adds vscode web UI for an interactive editing/terminal session
  • Installs zsh, powerlevel10k, and Nerd Fonts
  • Installs AWS CLI
  • Sets up AWS credentials from UDF API in ~/.aws/

UDF Console steps:

  1. In the sidebar, click Deployments, then click Create Deployment in the top right
# UDF Console steps:
# In the sidebar, click Deployments, then click Create Deployment in the top right
# Set provider to UDF and give the deployment a name
# Open the new deployment, click "Cloud Accounts", then "Add AWS Cloud Account"
# Click Components, then Systems, then Add.
# Choose template Ubuntu 20.04 LTS Server
# Set to 4 vCPUs, 15GB RAM, 370GB Disk, then click Create
# Click start, and select n1-standard-4 as the deployment size
# SSH into the Ubuntu VM once started
{
"info": {
"description": "Swagger auto-generated from learnt schema for ves-io-j-chambers-j-chambers-arcadia-http-lb",
"title": "ves-io-j-chambers-j-chambers-arcadia-http-lb",
"version": "2022-07-01 03:09:03"
},
"paths": {
"/": {
"get": {
"consumes": [