Skip to content

Instantly share code, notes, and snippets.

@MacaylaMarvelous81
MacaylaMarvelous81 / resize.sh
Created April 8, 2024 23:45
Resize window for serial console automatically
echo -ne '\e[s\e[5000;5000H'
IFS='[;' read -p $'\e[6n' -d R -a pos -rs
echo -ne '\e[u'
stty cols "${pos[2]}" rows "${pos[1]}"

Keybase proof

I hereby claim:

  • I am macaylamarvelous81 on github.
  • I am jomarm (https://keybase.io/jomarm) on keybase.
  • I have a public key ASDbSvwNL5hl2ZCy4-iLFUcNzRe6fB8E-rvYjjAtp_FqdQo

To claim this, I am signing this object:

@MacaylaMarvelous81
MacaylaMarvelous81 / SteamWorkshopUploadSnippet.cs
Last active December 1, 2022 05:43
code snippet - Uploading to the Steam Workshop (by Jeremy Wolf, one wheel studio, src: https://onewheelstudio.com/blog/2020/12/3/steam-workshop-with-unity-and-facepunch-steamworks)
private static async Task UploadLevelToSteamWorkshopAsync(string levelName)
{
Debug.Log("Uploading...");
//app data path is to the folder
//my files are stored in a folder with the same name as the level name
string appDataPath = ES3Settings.defaultSettings.FullPath;
appDataPath = appDataPath.Replace("SaveFile.es3", levelName);
//the preview path is to the image file
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
"args": { "VARIANT": "ubuntu-22.04" }
},