Skip to content

Instantly share code, notes, and snippets.

View carlosal1015's full-sized avatar
🇵🇪
Studying mathematics

Oromion carlosal1015

🇵🇪
Studying mathematics
View GitHub Profile
@carlosal1015
carlosal1015 / squash.md
Created August 24, 2023 17:26 — forked from lpranam/squash.md
How to squash commits

What is squashing?

Squashing is a process in which we squeeze multiple commits into one pretending it is only a single commit.

Basically squashing commits means we are rewriting the history of commits to make them look like single commit.

squash-diagram.jpg

Why squashing commits is necessary?

@carlosal1015
carlosal1015 / renew-gpgkey.md
Created January 13, 2023 21:28 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@carlosal1015
carlosal1015 / matplotlib_animation_wave.py
Created December 12, 2022 04:07 — forked from ciscorn/matplotlib_animation_wave.py
matplotlib animation:: 1-d & 2-d wave equation
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.pylab import plt
from matplotlib import animation, cm
import numpy as np
from scipy.signal import convolve, convolve2d
class Wave1D:
K = np.array([1, -2, 1])
@carlosal1015
carlosal1015 / double.py
Created October 19, 2022 02:07 — forked from carlozamagni/double.py
Python support for IEEE 754 double-precision floating-point numbers.
# double.py
# Copyright (C) 2006, 2007 Martin Jansche
#
# 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, distribute with modifications, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@carlosal1015
carlosal1015 / compiling_OpenFOAM-4.x.md
Created March 20, 2022 18:23 — forked from joaoantoniocardoso/compiling_OpenFOAM-4.x.md
Compiling OpenFOAM-4.x at 2019 on Linux with ZSH, GCC 9.1

PROBLEM

I was trying to install Helix-OS on my Arch Linux at 2019 with ZSH and GCC 8.1 and because it is quite old it recommends OpenFOAM-4.1.

Naturally, there is no package for older OpenFOAM on AUR, so it need to be built from the sources and of course we have to solve some compatibility issues and here is a collection of fixes found on the internet :)

Get the sources

Note that using the folder names with sufix 4.1 for version 4.1 would help some of the scripts.

mkdir -p $HOME/OpenFOAM

@carlosal1015
carlosal1015 / ArchLinuxWSL2.md
Created February 27, 2022 20:55 — forked from ld100/ArchLinuxWSL2.md
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@carlosal1015
carlosal1015 / Arch_Linux_Packaging.md
Created December 25, 2021 03:21 — forked from orhun/Arch_Linux_Packaging.md
Custom guide for managing Arch Linux packages

Packaging for Arch Linux

Requirements

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Pre-requisitos:

arch-install-scripts, deboostrap

Instalación ArchLinux: mkdir ArchLinux && pacstrap -c ArchLinux base linux-api-headers

Una vez iniciada sesion con systemd-nspawn -D ArchLinux (debe usar la opción -D solamente), debemos borrar los archivos /etc/securetty y /usr/share/factory/etc/securetty dentro del contenedor solamente, además de añadirlos al archivo /etc/pacman.conf del mismo, en la opción NoExtract. La línea sería la siguiente:

NoExtract = /etc/securetty /usr/share/factory/etc/securetty

@carlosal1015
carlosal1015 / kernel-dev.md
Created August 16, 2021 15:25 — forked from vegard/kernel-dev.md
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.