Skip to content

Instantly share code, notes, and snippets.

@ismarsantos
ismarsantos / SyncFolders.ps1
Created April 6, 2024 02:45 — forked from lafleurh/SyncFolders.ps1
PowerShell script to do a two-way sync of Windows folders
Param (
[string]$LeftFolder,
[string]$RightFolder
)
function CreateFolderStructure([string]$Path)
{
if (-not [string]::IsNullOrWhiteSpace($Path))
{
if (-not (Test-Path $Path))
@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
@ismarsantos
ismarsantos / docker-compose.yaml
Created March 23, 2024 03:05 — forked from BlueHippoGithub/docker-compose.yaml
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
@ismarsantos
ismarsantos / description.sh
Created February 8, 2024 08:09 — forked from sebyx07/description.sh
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
@ismarsantos
ismarsantos / archlinux-qemu-kvm.md
Created December 7, 2023 05:29 — forked from tatumroaquin/archlinux-qemu-kvm.md
QEMU-KVM Installation for Arch Linux

Arch Linux QEMU-KVM

install all necessary packages

sudo pacman -S virt-manager virt-viewer qemu qemu-arch-extra \
edk2-ovmf vde2 ebtables dnsmasq bridge-utils openbsd-netcat libguestfs

enable libvirt daemon

@ismarsantos
ismarsantos / DEPLOY_WITH_KAMAL_ON_DEDICATED_SERVER.md
Created November 8, 2023 17:55 — forked from n-studio/DEPLOY_WITH_KAMAL_ON_DEDICATED_SERVER.md
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.

@ismarsantos
ismarsantos / README.md
Created August 14, 2023 01:11 — forked from hardiksondagar/README.md
Ubuntu: Bash history search, partial + up-arrow

Both methods below are almost equivalent, it just depends on which file you want to edit. I'd recommend .bashrc myself, as it doesn't involve editing a local copy of a system file.

If you experience any problems with this, please comment below so that it can be fixed.

Using ~/.bashrc

  1. Edit ~/.bashrc with this command:
gedit ~/.bashrc
@ismarsantos
ismarsantos / maps.txt
Created August 8, 2023 18:16 — forked from AmandaCarvalho-R/maps.txt
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.
@ismarsantos
ismarsantos / win11.xml
Created June 20, 2023 22:19 — forked from akitaonrails/win11.xml
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>
@ismarsantos
ismarsantos / using-uuid-as-pk.md
Created February 6, 2023 19:19 — forked from rponte/using-uuid-as-pk.md
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes