Skip to content

Instantly share code, notes, and snippets.

View meleu's full-sized avatar
👨‍💻
Coding...

meleu meleu

👨‍💻
Coding...
View GitHub Profile

How to deploy a Rails 7.1 app with Postgres and Kamal on a single server

I think you have looked at the tutorial from Mr. Heinemeier Hansson at least once or twice and have a similar setup.

rails new kamal_pg --css tailwind --skip-test --database=postgresql

cd kamal_pg
@stettix
stettix / things-i-believe.md
Last active July 7, 2024 03:09
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@meleu
meleu / rsync.md
Last active May 18, 2022 17:16
Clonando com rsync

Clonando um sistema com rsync

Tava precisando migrar um sistema da Amazon para a Digital Ocean, e para clonar o sistema todo, usei rsync.

Conectei na máquina a ser migrada/clonada e mandei o seguinte comando:

sudo rsync --numeric-ids -aHAXSve ssh \
    --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} \
    / root@NewServer:/destination/directory
@Hobadee
Hobadee / create-ansible-playbook.sh
Last active April 25, 2023 05:41 — forked from skamithi/create-ansible-playbook-template.sh
script to create ansible playbook structure
#!/usr/bin/env bash
# Script to create ansible playbook directories
# With thanks to https://gist.github.com/skamithi/11200462 for giving me the idea
# We attempt to lay everything out according to Ansible best practices:
# https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html#playbooks-best-practices#directory-layout
gitinit(){
# Start with sensible .gitignore defaults
/*
The MIT License (MIT)
Copyright (c) 2016 Andre Leiradella
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@fnky
fnky / ANSI.md
Last active July 7, 2024 15:39
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@mrVanboy
mrVanboy / giltab-runner-local-docker.md
Last active June 26, 2023 07:22
Debugging Gitlab CI without installing gitlab-runner

Debugging Gitlab CI jobs locally

You can find a bunch of articles about debugging Gitlab CI jobs locally. My top results from google:

But in all that articles the described way is to install Docker and gitlab-runner executable, run gitlab-runner exec docker JOB_NAME_FROM_GITLAB_CI_YML after that in your repo.

I don't like this approach because I want a simpler way to run appropriate gitlab-runner executable and don't

@leiradel
leiradel / retromods.md
Last active June 29, 2023 05:20
Retromods spec brain dump. *Highly volatile!*

Retromods

What is a mod?

A mod is a set of code and assets that changes or augments the way a game is run. Examples of mods are:

  • Music and sound packs that replace the original game music and sound.
  • Graphics packs that replace the original game graphics.
  • Level packs that change or replace the original game levels.
  • Achievements that are awarded to the players when they complete tasks in the game.
@1nVitr0
1nVitr0 / autocollection.sh
Last active April 10, 2022 21:01
Shell Script for automatically creating file collections, e.g. for games
# Shell script for automatically creating file collections
# initally written to reduce the number of games when downloading
# retropie rom collections
#!/bin/bash
version="0.3.1"
collection=()
collectionname=""
collsize=0
#!/bin/bash
set -euo pipefail
# Here strings are noted to be faster for a small amount of
# data as compared to pipes where the setup cost dominates.
# https://unix.stackexchange.com/a/219806/158139
response=$(w3m -dump "http://explainshell.com/explain?cmd="$(echo $@ | tr ' ' '+'}))
cat -s <(grep -v -e explainshell -e • -e □ -e "source manpages" <<< "$response")