Skip to content

Instantly share code, notes, and snippets.

@n-studio
n-studio / DEPLOY_WITH_KAMAL_ON_DEDICATED_SERVER.md
Last active April 22, 2024 22:47
Deploy a web app on a dedicated server with Kamal

Warning

This gist is still a draft. At the moment it is not functional: see basecamp/kamal#257

Motivation

Kamal was designed with 1 service = 1 droplet/VPS in mind.
But I'm cheap and I want to be able to deploy multiple demo/poc apps apps on my $20/month dedicated server.
What the hell, I'll even host my private container registry on it.

@AmandaCarvalho-R
AmandaCarvalho-R / maps.txt
Created August 8, 2023 18:14
Google maps configuration
step 1
sudo nano /etc/hosts
add line
127.0.1.1 lvh.me
https://console.cloud.google.com/apis/credentials
Set an application restriction
Application restrictions limit an API key’s usage to specific websites, IP addresses, Android applications, or iOS applications. You can set one application restriction per key.
@akitaonrails
akitaonrails / win11.xml
Created January 17, 2023 16:29
My Windows 11 libvirt XML configuration
<domain type='kvm'>
<name>win11-real</name>
<uuid>45768371-b871-4937-b7c2-60ed835011de</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>33554432</memory>
<currentMemory unit='KiB'>33554432</currentMemory>
@BlueHippoGithub
BlueHippoGithub / docker-compose.yaml
Created August 11, 2022 18:51
Remember to change the volumes for your own desired path
version: '3.3'
networks:
caddy:
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
security_opt:
- no-new-privileges:true
@echo off
pushd "%~dp0"
rem Command generated using the editor's project launcher. See https://docs.unrealengine.com/en-US/SharingAndReleasing/Deployment/ProjectLauncher
rem For arguments documentation see https://github.com/botman99/ue4-unreal-automation-tool.
rem Use `-nocompileeditor` for forcing the editor not to compile.
.\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project=%~dp0<project_name>\<project_name>.uproject -nop4 -clientconfig=Development -serverconfig=Development -unrealexe=%~dp0Engine\Binaries\Win64\UnrealEditor-Cmd.exe -utf8output -platform=Win64 -targetplatform=Win64 -build -cook -map=Splash.umap+Map.umap+Forest.umap -cookdir=%~dp0\<project_name>\Content\Stage\Prints\Abilities+%~dp0\<project_name>\Content\Stage\Animations -skipcookingeditorcontent -unversionedcookedcontent -pak -distribution -compressed -stage -package -stagingdirectory="%~dp0Dist"
popd
@egg82
egg82 / proxmox_nvidia.md
Last active May 4, 2024 14:03
NVidia Proxmox + LXC

Proxmox

Find the proper driver at the NVidia website.

Note: Make sure to select "Linux 64-bit" as your OS

Hit the "Search" button.

@sebyx07
sebyx07 / description.sh
Created February 24, 2021 19:14
hatchbox restore postgres db
# cd into the backup
tar -xvf DATABASE.tar
cd DATABASE/databases
gunzip -k PostgreSQL.sql.gz
psql DATABASE_URL < Postgresql.sql

This is a work in progress, proceed with caution

Install Proxmox and a Ubuntu VM with Portainer to manage docker containers

Setup Proxmox

  1. Install Proxmox 6.X iso I selected 2 drives in Raid 1 mirror
  2. Console/SSH into Proxmox
  3. nano /etc/apt/sources.list
@kurokobo
kurokobo / docker-compose-installer-for-container-optimized-os-on-gce.md
Last active March 29, 2024 17:50
Simple Installer for Docker Compose on Container-Optimized OS on Google Computing Engine

Simple Installer for Docker Compose on Container-Optimized OS on Google Computing Engine

The easiest way to make Docker Compose available on Container-Optimized OS on Google Compute Engine (GCE) on Google Cloud Platform (GCP).

This is minimal Bash script version of Community Tutorial.

How to use

Simply, download installer.sh, run it, and then reload bash by source ~/.bashrc or re-login.

@null-dev
null-dev / disable-fb.sh
Created January 7, 2021 06:50
Disable efifb at runtime
#!/usr/bin/env bash
# 1. Download and install the QEMU hook helper from here: https://github.com/PassthroughPOST/VFIO-Tools
# 2. Place this file in /etc/libvirt/hooks/qemu.d/NAME OF YOUR VM/prepare/begin/disable-fb.sh
# 3. Make disable-fb.sh executable.
VM_NAME="$1"
echo "libvirt-qemu disable-fb: Disabling efi-framebuffer to prepare to pass GPU to VM $VM_NAME" > /dev/kmsg 2>&1
echo "efi-framebuffer.0" > /sys/bus/platform/devices/efi-framebuffer.0/driver/unbind