Skip to content

Instantly share code, notes, and snippets.

View jd-apprentice's full-sized avatar
❤️
Enjoying life!

Jonathan jd-apprentice

❤️
Enjoying life!
View GitHub Profile
@jd-apprentice
jd-apprentice / base.md
Last active October 15, 2023 02:14
Ansible reusable tasks in playbooks

To run the playbook we should call the docker.yml with a valid inventory for example ansible-playbook ansible/suite/docker.yml -i ansible/inventory/debian.ini

This command will execute the desired playbook which is going to execute the tasks from debian-update install docker-group

🌳 ansible-playbooks/
┣ 📁 ansible/
┃ ┣ 📁 inventory/
┃ ┃ ┗ 📄 debian.ini
┃ ┣ 📁 playbooks/
@jd-apprentice
jd-apprentice / install_software.md
Created August 2, 2023 14:30
Install software in powershell

Before installing the software, you need to change the execution policy

Set-ExecutionPolicy -Scope CurrentUser unrestricted
Set-ExecutionPolicy -Scope LocalMachine unrestricted

With this changes above we can now execute scripts like this

@jd-apprentice
jd-apprentice / CH340G.md
Created January 30, 2023 01:07
Arduino UNO CH340G

🏃‍♂️ Running the Arduino CH340

🤔 Why I am making a gist about this particular model? because I've entered the world of arduino recently and I already got a lot of problems with this model. As I noticed with the few lectures I made, the arduino uno ch340 is a fake one (chinese copy) which has a few issues with being detected by the computer, so after saying this I'm going to make a short guide on how I managed to make it work (at least in linux, sorry windows users).

☑️ Validate that our model is the correct one

  • First of all make sure your model is the CH340G which looks something like this -> model
  • Once we confirmed our model is the correct we are going to continue!
@jd-apprentice
jd-apprentice / guide.md
Last active May 8, 2024 04:37
# Dockerize a database + DBeaver

How to build and run our containers.

First create a .env file with the following structure (names are like this because i'm using postgres)

POSTGRES_CONTAINER_NAME=
POSTGRES_CONTAINER_IMAGE_NAME=

postgres_USER=
postgres_PASS=
@jd-apprentice
jd-apprentice / ventoy-linux.md
Last active April 23, 2023 00:30
Ventoy en linux

Como armar un USB booteable desde linux

Descargar Ventoy

  • Nos dirigimos a la pagina de Ventoy Link
  • Descargamos el archivo llamado ventoy-1.0.79-linux.tar.gz

Descargar ISO's a utilizar

  • Antes de empezar el proceso seria ideal que ya tengan sus ISO's preparadas en mi caso voy a utilizar
@jd-apprentice
jd-apprentice / enviroment.md
Created August 8, 2022 22:47
Como manejar los entornos en angular

Services + environments angular

  • Primero que todo nos dirigimos a la ruta donde se encuentra este archivo el cual es el que vamos a usar para nuestro entorno de desarollo.

$$ |-->src/environments --> environments.ts $$

@jd-apprentice
jd-apprentice / README.md
Created July 31, 2022 20:58
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=

Example ToDo Contract

  • Create a task
  • Read a task
  • Update a task
@jd-apprentice
jd-apprentice / app-routing.module.ts
Last active February 20, 2022 00:21
Module example angular
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: '',
loadChildren: () =>
import('./views/home/home.module').then((m) => m.HomeModule),
data: {
title: 'Home',