Skip to content

Instantly share code, notes, and snippets.

View TheFern2's full-sized avatar

Fernando B TheFern2

View GitHub Profile
@TheFern2
TheFern2 / install_cuda_11_ubuntu_2004.md
Created September 19, 2023 23:52 — forked from ksopyla/install_cuda_11_ubuntu_2004.md
How to install CUDA toolkit 11 at ubuntu 20.04

Step by step instruction how to install CUDA 11 Ubuntu 20.04

NVidia Ubuntu 20.04 repository for CUDA 11

If you need CUDA Tolkit 11 with nvcc, other tools and libraries you can install it from NVIDIA Ubunutu 20.04 repository.

Add Ubuntu 20.04 repository

@TheFern2
TheFern2 / bash_strict_mode.md
Created April 10, 2023 16:24 — forked from vncsna/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
@TheFern2
TheFern2 / multiple_ssh_setting.md
Created October 31, 2022 15:30 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@TheFern2
TheFern2 / fish_install.md
Created October 28, 2022 14:49 — forked from gagarine/fish_install.md
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

Install Fish

brew install fish

@TheFern2
TheFern2 / opene.sh
Created December 7, 2021 23:39 — forked from beakr/opene.sh
Open Windows file explorer on a directory with Cygwin.
#!/bin/bash.exe
# This script opens a given directory up in the Windows file explorer. I did
# this to make it easy when opening directories in the Cygwin system using
# the explorer.
#
# To install:
#
# $ touch /usr/bin/opene
# $ vim /usr/bin/opene
@TheFern2
TheFern2 / redis_cheatsheet.bash
Created February 12, 2021 17:55 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@TheFern2
TheFern2 / tut.md
Created October 13, 2020 00:23 — forked from rain1024/tut.md
Install pdflatex ubuntu

PdfLatex is a tool that converts Latex sources into PDF. This is specifically very important for researchers, as they use it to publish their findings. It could be installed very easily using Linux terminal, though this seems an annoying task on Windows. Installation commands are given below.

  • Install the TexLive base
sudo apt-get install texlive-latex-base
  • Also install the recommended and extra fonts to avoid running into the error [1], when trying to use pdflatex on latex files with more fonts.
@TheFern2
TheFern2 / Install PyQt5 on Ubuntu with python3 .md
Created August 5, 2020 00:57 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@TheFern2
TheFern2 / fetch_nike_puls_all_activities.bash
Created January 23, 2020 01:18 — forked from niw/fetch_nike_puls_all_activities.bash
A simple NikePlus API description to fetch past run metrics
#!/usr/bin/env bash
# fetch_nike_puls_all_activities.bash
# A simple bash script to fetch all activities and metrics from NikePlus.
# See `nike_plus_api.md` for the API details.
readonly bearer_token="$1"
if [[ -z "$bearer_token" ]]; then
echo "Usage: $0 bearer_token"
exit
@TheFern2
TheFern2 / MANUAL.md
Created January 7, 2020 22:20 — forked from kimyvgy/MANUAL.md
Deploy nodejs app with gitlab.com and pm2

Deploy nodejs app with gitlab.com and pm2

This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:

  • Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
  • Windows 10 on my PC to work.