Skip to content

Instantly share code, notes, and snippets.

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

Oromion carlosal1015

🇵🇪
Studying mathematics
View GitHub Profile
@joaoantoniocardoso
joaoantoniocardoso / compiling_OpenFOAM-4.x.md
Last active December 19, 2023 17:00
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

@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active February 6, 2025 05:53
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@bittner
bittner / keyboard-keys.md
Created February 28, 2019 22:50
Keyboard keys markup in MarkDown

Ctrl + Alt + Space

@amlamarra
amlamarra / reposync.sh
Last active May 13, 2022 14:46
A Bash script to update multiple Git repositories at the same time. It also maintains a list of these repos in a text file to keep synced with your dotfiles across other systems.
#!/usr/bin/env bash
#########################################################################
## Title: reposync.sh
## Description: Syncs multiple git repositories in ~/tools/ based on the
## ~/.repolist file. Put each repo URL in there.
## Author: Andrew Lamarra
## Created: 01/23/2019
## Dependencies: bash (v4.0+), git
#########################################################################
@jhuangtw
jhuangtw / pipenv_jupyter.sh
Last active May 28, 2020 19:19
Running Jupyter with pipenv
pipenv install ipykernel jupyter
pipenv shell
python -m ipykernel install --user --name=$(basename $(pwd))
jupyter notebook
# then in UI, switch kernel to the one matching your pipenv shell name
@lpranam
lpranam / squash.md
Last active August 3, 2025 10:49
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?

@krisleech
krisleech / renew-gpgkey.md
Last active August 14, 2025 14:38
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:

@jmoy
jmoy / Friends.thy
Last active June 10, 2022 20:56
Solving a puzzle using the Isabelle proof assistant
section ‹A Simple Graph Problem›
text ‹
We shall prove the following: "In a finite group of people, some of whom are friends with some
of the others there must be at least two people who have the same number of friends."
theory Friends
imports Main
Finite_Set
@bmegli
bmegli / doxygen-with-travis-ci.md
Created May 29, 2018 21:54
Doxygen with Travis CI to gh-pages

Setup github project so that after any change to master branch doxygen documentation is generated and pushed to gh-pages by Travis CI

  1. Add clean gh-pages branch to your repository
git checkout --orphan gh-pages
git rm -rf .
echo "my gh-pages branch" > README.md
git add .
git commit -a -m "clean gh-pages branch"
git push origin gh-pages
@EdJoPaTo
EdJoPaTo / aurstuff.md
Last active May 11, 2023 04:08
useful commands while building an AUR package

Start a new one

git clone ssh://[email protected]/package_name.git

Prototype files are in /usr/share/pacman

Tools

Generate md5sums