Skip to content

Instantly share code, notes, and snippets.

View terracenter's full-sized avatar

Freddy Taborda terracenter

View GitHub Profile

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@terracenter
terracenter / Laravel Sail Setup.md
Created August 30, 2024 01:08 — forked from LaurenceRawlings/Laravel Sail Setup.md
Setup Laravel Sail from source control

Laravel Sail Setup

This is a simple script along with some useful information to help when setting up a Laravel Sail project that was cloned from source control. I made this because I could not find anywhere that explained how to do this and kept running into problems. The main issue was a problem with database authentication. It turns out that when the Docker volume is created for the database for the first time the password that is in the .env file is used, which I usually created after starting Sail for the first time. Another issue was not having access to the Sail binary to start the containers. This is solved by the script by installing the composer dependencies with a disposable container. If you follow the steps below in order you should not run into any issues. Feel free to leave a comment on this Gist if it could be improved.

How to use

@terracenter
terracenter / intel_x520_patcher.py
Created July 2, 2024 18:01 — forked from ixs/intel_x520_patcher.py
Intel x520 EEPROM Patcher allows to unlock the x520 network card to work with non-intel branded SFP modules.
#!/usr/bin/env python3
#
# Simple Intel x520 EEPROM patcher
# Modifies the EEPROM to unlock the card for non-intel branded SFP modules.
#
# Copyright 2020,2021,2022 Andreas Thienemann <[email protected]>
#
# Licensed under the GPLv3
#
# Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/
@terracenter
terracenter / Howto.txt
Created March 5, 2024 00:36 — forked from aspann/Howto.txt
Contabo - Howto install Gentoo/Linux
## prerequirements (VPS - XL) - after entered the rescuesystem
bash
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
cd /mnt/gentoo
#stage3: https://www.gentoo.org/downloads/#other-arches | current: http://distfiles.gentoo.org/releases/amd64/autobuilds/20170525/stage3-amd64-20170525.tar.bz2
wget <PASTED_STAGE_URL>
@terracenter
terracenter / nmbrnetkvm.md
Created January 11, 2024 14:15 — forked from plembo/nmbrnetkvm.md
NetworkManager bridged network for KVM guests

Setting up a bridged network for KVM guests

This will work with either networkd or NetworkManager as a resolver. In fact, this is the only way to do bridged KVM (libvirtd) networking with NetworkManager.

If you're using NetworkManager (on a desktop or laptop, for example) on your KVM host, follow these instructions to set up a bridge interface.

Once you have the host bridge set up, proceed as follows:

  1. Create a bridge network device inside KVM. Edit and save the below text as file host-bridge.xml:
@terracenter
terracenter / addbr0ubunmcli.md
Created January 11, 2024 14:15 — forked from plembo/addbr0ubunmcli.md
Add br0 to Ubuntu desktop using nmcli

Add a bridge interface to Ubuntu desktop using nmcli

Had to do this for some advanced networking with KVM, and couldn't figure out how to do it using the Nework Manager gui. Did find an article later that showed how to do it with nmtui, but it's so much easier to record what you did when using the cli.

Note: I now set net.ifnames=0 in grub for all my machines, to ensure my device names are "predictable" (so the first ethernet device will be "eth0" and not "ens1", "eno1 or anything else).

To see what everything looks like before starting:

@terracenter
terracenter / notes-lmde-with-lvm-on-luks.txt
Created December 5, 2023 17:38 — forked from seanorama/notes-lmde-with-lvm-on-luks.txt
Install LMDE (Linux Mint Debian Edition) with LVM on LUKS (encryption) & hibernation support
# Title: Install LMDE (Linux Mint Debian Edition) 17 with LVM on LUKS (encryption) & hibernation support
#
# Description: These are very rough notes for installing LMDE with
# encryption via LVM on top of LUKS.
# - This includes SWAP being within LUKS
# - Includes fixing hibernation (which will also apply to Debian Jessie or greater)
########
# 1. Boot from LMDE DVD/USB/...
@terracenter
terracenter / install_postman_mint_no_snap.md
Created November 7, 2023 01:40 — forked from prrao87/install_postman_mint_no_snap.md
Install Postman on Linux Mint (without using snap)

Goal

Postman is a usefull app to build and test APIs, most commonly installed on ubuntu-like systems via snap. On recent distributions of Linux Mint (20 and above), snap installs are no longer possible. The instructions below show how to install Postman via the terminal.

Download Postman

$ wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz

Extract archive

$ sudo tar -xzf postman.tar.gz -C /opt

Make symlink

Ayuda para instalar Virt-manager en Gentoo

  • Instalación de virt-manager
    • Primero necesitamos añadir algo de información para construir virt-manager y qemu correctamente:

      echo "app-emulation/virt-manager gui policykit sasl" |  sudo tee  /etc/portage/package.use/virt-manager
      echo "app-emulation/qemu fuse lzo nfs numa opengl plugins python snappy ssh usbredir vde vte " |  sudo tee  /etc/portage/package.use/qemu
@terracenter
terracenter / php-docker-ext
Created October 25, 2022 16:06 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/